This example shows how you can playing a video in your own window.
(without the VideoCore Player)
Example using the implementation class
#include <windows.h> // We are including the main header file it that contains // the implementation class. #include <ceVideoCoreImpl.h> #include <cstdio> // For printf.
// We are using the namespace "ce" (CorEngine) by default (Optional). using namespace ce;
// We are creating our own manager class, inheriting the implementation class. class CVideoManager : public IVideoManagerImpl<CVideoManager> { public:
inline void Example(void) const { // Load a video file. this -> Video -> LoadVideoFile("video1.mpg", CE_VIDEO_NOPLAYBAR | CE_VIDEO_NOMENU | CE_VIDEO_AUTOPLAY); };
if (hWnd == NULL) { ::UnregisterClass(wincl.lpszClassName, wincl.hInstance); return 1; }
::ShowWindow(hWnd, SW_SHOWDEFAULT);
// --- VideoCore ---
// We are creating a instance of our manager class. const CVideoManager Video;
// Verify the integrity of the manager class (Optional). if (Video -> VerifyVideoManager() == 0) { ::UnregisterClass(wincl.lpszClassName, wincl.hInstance); return 1; }
// This method registers a window for subsequent use in calls // to the CreateVideoWindow() method. Video -> RegisterVideoWindow(wincl.hInstance, hWnd);
#include <windows.h> // We are including the main header file it that contains the interface class. #include <ceVideoCore.h> #include <cstdio> // For printf.
// We are using the namespace "ce" (CorEngine) by default (Optional). using namespace ce;
if (hWnd == NULL) { ::UnregisterClass(wincl.lpszClassName, wincl.hInstance); return 1; }
::ShowWindow(hWnd, SW_SHOWDEFAULT);
// --- VideoCore ---
// We are creating a instance of the manager class. IVideoManager *Video = CreateVideoManager(); if (Video == NULL) { ::UnregisterClass(wincl.lpszClassName, wincl.hInstance); return 1; }
// This method registers a window for subsequent use in calls // to the CreateVideoWindow() method. Video -> RegisterVideoWindow(wincl.hInstance, hWnd);
// Load a video file. Video -> LoadVideoFile("video1.mpg", CE_VIDEO_NOPLAYBAR | CE_VIDEO_NOMENU | CE_VIDEO_AUTOPLAY);