Skip to content

Instantly share code, notes, and snippets.

View nguditi's full-sized avatar
😁

tien_nguyen nguditi

😁
View GitHub Profile
#include <iostream>
#include <thread>
#include <mutex>
class RecursiveMutex {
public:
void lock() {
std::unique_lock<std::mutex> lock(m_mutex);
if (m_owner == std::this_thread::get_id()) {
// This thread already owns the lock, so increment the recursion count
#include <iostream>
#include <thread>
#include <mutex>
#include <condition_variable>
class SharedMutex {
public:
void lock_shared() {
std::unique_lock<std::mutex> lock(m_mutex);
m_readers_waiting++;
@nguditi
nguditi / gist:27c81a205cc5e7697984c0d3ecf026ad
Created June 1, 2021 05:55
Build FFmpeg static lib in Window using MSYS2 and MSVC 2017
It's take two day searching and trying to firgure out the correct way =)))
follow https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT
-------BUT IT'S NOT WORK--------
1. Make sure SET LIB ; SET LIBPATH ; SET INCLUDE with exist and right path(version, exist binary files...)
2. Make sure evironment path, environment variables point to right value/path.
--------If still cannot build, follow my way---------