diff options
author | sesse <sesse@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-08 19:57:37 +0000 |
---|---|---|
committer | sesse <sesse@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-08 19:57:37 +0000 |
commit | 18deeb4aff87e89f3e5bd9247d8f96449316bb25 (patch) | |
tree | 4054f6886a084f473e35b6cbc19656fedaae6d94 /loader/dshow/DS_Filter.c | |
parent | 9b67104eb7bb5832a4b9d5fef92dd23b4befeb14 (diff) | |
download | mpv-18deeb4aff87e89f3e5bd9247d8f96449316bb25.tar.bz2 mpv-18deeb4aff87e89f3e5bd9247d8f96449316bb25.tar.xz |
Implement DirectShow filter graph.
DirectShow specifies that a filter (codec) can expect JoinFilterGraph
to be called, and store a reference to the graph manager. Implement a
very bare-bones graph manager (all functions are stubs, and no extra
interfaces are implemented) and give it to the codec on init.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30866 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/DS_Filter.c')
-rw-r--r-- | loader/dshow/DS_Filter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/loader/dshow/DS_Filter.c b/loader/dshow/DS_Filter.c index e3102cf264..693d59c25f 100644 --- a/loader/dshow/DS_Filter.c +++ b/loader/dshow/DS_Filter.c @@ -5,6 +5,7 @@ #include "config.h" #include "DS_Filter.h" +#include "graph.h" #include "loader/drv.h" #include "loader/com.h" #include <stdio.h> @@ -125,6 +126,7 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id, // char eb[250]; const char* em = NULL; MemAllocator* tempAll; + FilterGraph* graph; ALLOCATOR_PROPERTIES props,props1; DS_Filter* This = malloc(sizeof(DS_Filter)); if (!This) @@ -166,6 +168,7 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id, ULONG fetched; HRESULT result; unsigned int i; + static const uint16_t filter_name[] = { 'F', 'i', 'l', 't', 'e', 'r', 0 }; This->m_iHandle = LoadLibraryA(dllname); if (!This->m_iHandle) @@ -199,6 +202,10 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id, em = "object does not provide IBaseFilter interface"; break; } + + graph = FilterGraphCreate(); + result = This->m_pFilter->vt->JoinFilterGraph(This->m_pFilter, (IFilterGraph*)graph, filter_name); + // enumerate pins result = This->m_pFilter->vt->EnumPins(This->m_pFilter, &enum_pins); if (result || !enum_pins) |