Posts

Showing posts from 2016

Simple effective Event/Delegate Method in c++

C++ delegate/event Callback class (base class) : if return Type is void template <typename Param0> class Callback { public:     virtual void invoke(Param0 param0) = 0; }; the Param0 type is the type of the one parameter passed to the function. You can use more than one parameter to pass by using   template <typename Param0, typename Param 1 >  then invoke method will be replaced by   virtual void invoke(Param0 param0, Param1 param1) = 0;   now if return type is not void then class will be defined as template <typename Ret, typename Param0> class Callback { public:     virtual Ret invoke(Param0 param0) = 0; }; The Ret is the return type of the function. Member function (method) callback (Derived Class) : Member function (method) callbacks keep track of which object address to use for the this pointer while invoking the method. when return type is void template <typename Param0, typename Object, typename Method> class MethodCallback

Build shared library of ffmpeg with x264 to use in visual studio win32 project

After few painful failure attempts at last i was able to build shared library which can be used in visual studio win32 project. Here is the process which i have gone through. Hope this will be helpful. I don't want any body to face the same failure moments.. Environment settings Download msys2 32 bit form this link http://msys2.github.io and install it.(in my case installed " msys2-i686-20160205.exe " in directory is "c:\msys32" ). Run it and run below commands update-core ( Update the system packages with) close MSYS2, run it again and run below commands pacman -Sy pacman -Su  (sometimes this command creates error then you have uninstall msys2 and install again. In that case you can ignore this command) pacman -S pkg-config make diffutils  go to C:\msys32\usr\bin and rename "link.exe" to "link_backup.exe". Because we will not use this link. we will use visual studio link. Download yasm win32 ".exe&quo