Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,257 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// File: SampGrabCB.cpp
|
||||
//
|
||||
// Desc: DirectShow sample code - C++ console application demonstrating
|
||||
// use of the IMediaDet interface to create a graph that contains a
|
||||
// sample grabber filter. It shows how to use the sample grabber
|
||||
// and a COM object callback to display information about media
|
||||
// samples in a running video file.
|
||||
//
|
||||
// Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// Function prototypes
|
||||
//
|
||||
int GrabSamples( char * pFilename );
|
||||
|
||||
#ifdef UNICODE
|
||||
#error This sample will not compile UNICODE.
|
||||
#endif
|
||||
|
||||
// This semi-COM object is a callback COM object for the sample grabber
|
||||
//
|
||||
class CFakeCallback : public ISampleGrabberCB
|
||||
{
|
||||
public:
|
||||
STDMETHODIMP_(ULONG) AddRef() { return 2; }
|
||||
STDMETHODIMP_(ULONG) Release() { return 1; }
|
||||
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void ** ppv)
|
||||
{
|
||||
if (riid == IID_ISampleGrabberCB || riid == IID_IUnknown)
|
||||
{
|
||||
*ppv = (void *) static_cast<ISampleGrabberCB *>(this);
|
||||
return NOERROR;
|
||||
}
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
STDMETHODIMP SampleCB( double SampleTime, IMediaSample * pSample )
|
||||
{
|
||||
static long counter = 0;
|
||||
printf( "Sample received = %05ld Clock = %ld\r\n",
|
||||
counter++, timeGetTime( ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
STDMETHODIMP BufferCB( double SampleTime, BYTE * pBuffer, long BufferLen )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if( argc != 2 )
|
||||
{
|
||||
printf( "Usage: SampGrabCB <filename>\r\n\r\n" );
|
||||
printf( "This application reads a media file and receives callbacks for every\r\n"
|
||||
"media sample processed. You must provide a valid filename.\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Initialize COM
|
||||
CoInitialize( NULL );
|
||||
|
||||
// Run the test on the filename specified on the command line
|
||||
GrabSamples( argv[1] );
|
||||
|
||||
// COM cleanup
|
||||
CoUninitialize( );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int GrabSamples( char * pFilename )
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
CFakeCallback pCallback;
|
||||
HRESULT hr;
|
||||
|
||||
printf("Grabbing samples from %s.\r\n", pFilename);
|
||||
|
||||
// create a media detector
|
||||
//
|
||||
CComPtr< IMediaDet > pDet;
|
||||
hr = CoCreateInstance( CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER,
|
||||
IID_IMediaDet, (void**) &pDet );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "Failed in CoCreateInstance! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// set filename
|
||||
//
|
||||
hr = pDet->put_Filename( T2W( pFilename ) );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "couldn't load the file! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// look for a video stream
|
||||
//
|
||||
long Streams = 0;
|
||||
hr = pDet->get_OutputStreams( &Streams );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "couldn't get the output streams! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
BOOL bFoundVideo = FALSE;
|
||||
|
||||
for( int i = 0 ; i < Streams ; i++ )
|
||||
{
|
||||
BOOL bIsVideo = FALSE;
|
||||
|
||||
AM_MEDIA_TYPE Type;
|
||||
memset( &Type, 0, sizeof( Type ) );
|
||||
|
||||
// Select a media stream
|
||||
hr = pDet->put_CurrentStream( i );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "couldn't put stream %d hr=0x%x\r\n", i, hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// Read the media type of the selected stream
|
||||
hr = pDet->get_StreamMediaType( &Type );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "couldn't get stream media type for stream %d hr=0x%x\r\n",
|
||||
i, hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// Does this stream contain video?
|
||||
if( Type.majortype == MEDIATYPE_Video )
|
||||
bIsVideo = TRUE;
|
||||
|
||||
FreeMediaType( Type );
|
||||
|
||||
if( !bIsVideo )
|
||||
continue;
|
||||
|
||||
// Found a video stream
|
||||
bFoundVideo = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if( !bFoundVideo )
|
||||
{
|
||||
printf( "Couldn't find a video stream\r\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
// this method will change the MediaDet to go into
|
||||
// "sample grabbing mode" at time 0.
|
||||
//
|
||||
hr = pDet->EnterBitmapGrabMode( 0.0 );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "Failed in EnterBitmapGrabMode! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// ask for the sample grabber filter that we know lives inside the
|
||||
// graph made by the MediaDet
|
||||
//
|
||||
CComPtr< ISampleGrabber > pGrabber;
|
||||
hr = pDet->GetSampleGrabber( &pGrabber );
|
||||
if( FAILED(hr) || !pGrabber)
|
||||
{
|
||||
printf( "couldn't find the sample grabber filter! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// set the callback (our COM object callback)
|
||||
//
|
||||
CComQIPtr< ISampleGrabberCB, &IID_ISampleGrabberCB > pCB( &pCallback );
|
||||
CComQIPtr< IBaseFilter, &IID_IBaseFilter > pFilter( pGrabber );
|
||||
hr = pGrabber->SetCallback( pCB, 0 );
|
||||
hr = pGrabber->SetOneShot( FALSE ); // don't do one-shot mode
|
||||
hr = pGrabber->SetBufferSamples( FALSE ); // don't buffer samples
|
||||
|
||||
// find the filter graph interface from the sample grabber filter
|
||||
//
|
||||
FILTER_INFO fi;
|
||||
memset( &fi, 0, sizeof( fi ) );
|
||||
hr = pFilter->QueryFilterInfo( &fi );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "Failed in QueryFilterInfo! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// Release the filter's graph reference
|
||||
if( fi.pGraph )
|
||||
fi.pGraph->Release( );
|
||||
IFilterGraph * pGraph = fi.pGraph;
|
||||
|
||||
// The graph will have been paused by entering bitmap grab mode.
|
||||
// We'll need to seek back to 0 to get it to deliver correctly.
|
||||
//
|
||||
CComQIPtr< IMediaSeeking, &IID_IMediaSeeking > pSeeking( pGraph );
|
||||
REFERENCE_TIME Start = 0;
|
||||
REFERENCE_TIME Duration = 0;
|
||||
|
||||
hr = pSeeking->GetDuration( &Duration );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "Failed in GetDuration! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = pSeeking->SetPositions( &Start, AM_SEEKING_AbsolutePositioning,
|
||||
&Duration, AM_SEEKING_AbsolutePositioning );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "Failed in SetPositions! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// run the graph
|
||||
//
|
||||
CComQIPtr< IMediaEvent, &IID_IMediaEvent > pEvent( pGraph );
|
||||
CComQIPtr< IMediaControl, &IID_IMediaControl > pControl( pGraph );
|
||||
hr = pControl->Run( );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "Failed to run the graph! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// wait
|
||||
//
|
||||
long EventCode = 0;
|
||||
hr = pEvent->WaitForCompletion( INFINITE, &EventCode );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
printf( "Failed in WaitForCompletion! hr=0x%x\r\n", hr );
|
||||
return hr;
|
||||
}
|
||||
|
||||
printf("Sample grabbing complete.\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
# Microsoft Developer Studio Project File - Name="SampGrabCB" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=SampGrabCB - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "SampGrabCB.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "SampGrabCB.mak" CFG="SampGrabCB - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "SampGrabCB - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "SampGrabCB - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "SampGrabCB - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "RELEASE" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\BaseClasses\Release\strmbase.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt.lib" /stack:0x200000,0x200000
|
||||
# SUBTRACT LINK32 /incremental:yes
|
||||
|
||||
!ELSEIF "$(CFG)" == "SampGrabCB - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "SampGrabCB___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "SampGrabCB___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DEBUG" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\BaseClasses\debug\strmbasd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /pdbtype:sept /stack:0x200000,0x200000
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "SampGrabCB - Win32 Release"
|
||||
# Name "SampGrabCB - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SampGrabCB.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "SampGrabCB"=.\SampGrabCB.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on SampGrabCB.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=SampGrabCB - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to SampGrabCB - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "SampGrabCB - Win32 Release" && "$(CFG)" != "SampGrabCB - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "SampGrabCB.mak" CFG="SampGrabCB - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "SampGrabCB - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "SampGrabCB - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "SampGrabCB - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\SampGrabCB.exe"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "BaseClasses - Win32 Release" "$(OUTDIR)\SampGrabCB.exe"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"BaseClasses - Win32 ReleaseCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\SampGrabCB.obj"
|
||||
-@erase "$(INTDIR)\SampGrabCB.pch"
|
||||
-@erase "$(INTDIR)\StdAfx.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\SampGrabCB.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "RELEASE" /Fp"$(INTDIR)\SampGrabCB.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\SampGrabCB.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=..\..\BaseClasses\Release\strmbase.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\SampGrabCB.pdb" /machine:I386 /nodefaultlib:"libcmt.lib" /out:"$(OUTDIR)\SampGrabCB.exe" /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\SampGrabCB.obj" \
|
||||
"$(INTDIR)\StdAfx.obj" \
|
||||
"..\..\BaseClasses\Release\STRMBASE.lib"
|
||||
|
||||
"$(OUTDIR)\SampGrabCB.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "SampGrabCB - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\SampGrabCB.exe"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "BaseClasses - Win32 Debug" "$(OUTDIR)\SampGrabCB.exe"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"BaseClasses - Win32 DebugCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\SampGrabCB.obj"
|
||||
-@erase "$(INTDIR)\SampGrabCB.pch"
|
||||
-@erase "$(INTDIR)\StdAfx.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\SampGrabCB.exe"
|
||||
-@erase "$(OUTDIR)\SampGrabCB.ilk"
|
||||
-@erase "$(OUTDIR)\SampGrabCB.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DEBUG" /Fp"$(INTDIR)\SampGrabCB.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\SampGrabCB.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=..\..\BaseClasses\debug\strmbasd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\SampGrabCB.pdb" /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /out:"$(OUTDIR)\SampGrabCB.exe" /pdbtype:sept /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\SampGrabCB.obj" \
|
||||
"$(INTDIR)\StdAfx.obj" \
|
||||
"..\..\BaseClasses\debug\strmbasd.lib"
|
||||
|
||||
"$(OUTDIR)\SampGrabCB.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("SampGrabCB.dep")
|
||||
!INCLUDE "SampGrabCB.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "SampGrabCB.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "SampGrabCB - Win32 Release" || "$(CFG)" == "SampGrabCB - Win32 Debug"
|
||||
SOURCE=.\SampGrabCB.cpp
|
||||
|
||||
"$(INTDIR)\SampGrabCB.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SampGrabCB.pch"
|
||||
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
|
||||
!IF "$(CFG)" == "SampGrabCB - Win32 Release"
|
||||
|
||||
CPP_SWITCHES=/nologo /MD /W3 /GX /O2 /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "RELEASE" /Fp"$(INTDIR)\SampGrabCB.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
"$(INTDIR)\StdAfx.obj" "$(INTDIR)\SampGrabCB.pch" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) @<<
|
||||
$(CPP_SWITCHES) $(SOURCE)
|
||||
<<
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "SampGrabCB - Win32 Debug"
|
||||
|
||||
CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DEBUG" /Fp"$(INTDIR)\SampGrabCB.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||
|
||||
"$(INTDIR)\StdAfx.obj" "$(INTDIR)\SampGrabCB.pch" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) @<<
|
||||
$(CPP_SWITCHES) $(SOURCE)
|
||||
<<
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "SampGrabCB - Win32 Release"
|
||||
|
||||
"BaseClasses - Win32 Release" :
|
||||
cd "\ntdev\multimedia\DirectX\dxsdk\samples\multimedia\dshow\BaseClasses"
|
||||
$(MAKE) /$(MAKEFLAGS) /F .\baseclasses.mak CFG="BaseClasses - Win32 Release"
|
||||
cd "..\Editing\SampGrabCB"
|
||||
|
||||
"BaseClasses - Win32 ReleaseCLEAN" :
|
||||
cd "\ntdev\multimedia\DirectX\dxsdk\samples\multimedia\dshow\BaseClasses"
|
||||
$(MAKE) /$(MAKEFLAGS) /F .\baseclasses.mak CFG="BaseClasses - Win32 Release" RECURSE=1 CLEAN
|
||||
cd "..\Editing\SampGrabCB"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SampGrabCB - Win32 Debug"
|
||||
|
||||
"BaseClasses - Win32 Debug" :
|
||||
cd "\ntdev\multimedia\DirectX\dxsdk\samples\multimedia\dshow\BaseClasses"
|
||||
$(MAKE) /$(MAKEFLAGS) /F .\baseclasses.mak CFG="BaseClasses - Win32 Debug"
|
||||
cd "..\Editing\SampGrabCB"
|
||||
|
||||
"BaseClasses - Win32 DebugCLEAN" :
|
||||
cd "\ntdev\multimedia\DirectX\dxsdk\samples\multimedia\dshow\BaseClasses"
|
||||
$(MAKE) /$(MAKEFLAGS) /F .\baseclasses.mak CFG="BaseClasses - Win32 Debug" RECURSE=1 CLEAN
|
||||
cd "..\Editing\SampGrabCB"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// SampGrabCB.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__58396749_18C9_4174_9B5C_28454A396FA4__INCLUDED_)
|
||||
#define AFX_STDAFX_H__58396749_18C9_4174_9B5C_28454A396FA4__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <streams.h>
|
||||
#include <qedit.h>
|
||||
#include <atlbase.h>
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__58396749_18C9_4174_9B5C_28454A396FA4__INCLUDED_)
|
||||
@@ -0,0 +1,26 @@
|
||||
DirectShow Editing Sample - SampleGrabberCallback
|
||||
-------------------------------------------------
|
||||
|
||||
This C++ console app demonstates the use of the IMediaDet interface
|
||||
to create a graph that contains a sample grabber filter.
|
||||
It shows how to use the sample grabber and a COM object callback
|
||||
to display information about media samples in a running video file.
|
||||
|
||||
Usage: SampGrabCB <media filename>
|
||||
|
||||
|
||||
Sample output:
|
||||
|
||||
Grabbing samples from c:\video\wink.mpg.
|
||||
Sample received = 00000 Clock = 170787198
|
||||
Sample received = 00001 Clock = 170787208
|
||||
Sample received = 00002 Clock = 170787228
|
||||
Sample received = 00003 Clock = 170787235
|
||||
Sample received = 00004 Clock = 170787239
|
||||
Sample received = 00005 Clock = 170787244
|
||||
Sample received = 00006 Clock = 170787250
|
||||
Sample received = 00007 Clock = 170787254
|
||||
Sample received = 00008 Clock = 170787260
|
||||
Sample received = 00009 Clock = 170787268
|
||||
Sample received = 00010 Clock = 170787272
|
||||
Sample grabbing complete.
|
||||
Reference in New Issue
Block a user