Tuesday, January 12, 2016
How to Pocket PC 2005 mp3 player directly through DirectShow?
I'm talking about here, "direct broadcast" means not using any other applications (such as Windows Media Player) or third-party plug-ins, and direct use PPC2005 Filter built-in decoder and playback.
First, I do experiments on (Windows2000 system) PC, through RenderFile interfaces, such as:
pGraphBuilder- & gt; RenderFile (L "c: \\ 1.mp3", NULL);
It plays correctly. Then enumerate the Graph all Filter, help me find the system automatically loaded the three Filter:
The first one is MPEG1 Stream Splitter;
The first two are MPEG1 Layer-3 Decoder; (I do not know this mp3 decoder built-in system or because I installed mp3 player)
The first three are Default DirectSound;
Graph by Render interfaces or build semi-automatic, such as:
IBaseFilter * pSourceFilter;
pGraphBuilder- & gt; AddSourceFilter (L "c: \\ 1.mp3", L "Source Filter", & amp; pSourceFilter);
By enumerating pSourceFilter the Pin, to get its output Pin - & gt; poutPin;
Then by looking at the registry MPEG1 Layer-3 Decoder corresponding GUID, create your own mp3 decoder Filter, and join Graph, and then Render SourceFilter output Pin:
pGraphBuilder- & gt; Render (poutPin);
You can also play properly. Then enumerate the Graph all Filter, found that in addition 3 Filter mentioned above, the addition of an I joined Source Filter.
Thus I assume on the PC via DirectShow playback mp3, except SourceFilter and decoder, another two Filter is also necessary.
Back PPC2005. First RenderFile No, I do not know the exact cause. Because the PPC2005 mp3 decoder is provided DMO way, perhaps the system can not help me create this IDMOWrapperFilter. So I can only own up to build Graph:
First or join Source Filter:
IBaseFilter * pSourceFilter;
pGraphBuilder- & gt; AddSourceFilter (L "\\ 1.mp3", L "Source Filter", & amp; pSourceFilter);
By enumerating pSourceFilter the Pin, to get its output Pin - & gt; poutPin;
Then create mp3 decoder DMO Filter, and add it into the Graph:
IBaseFilter * pFilter;
CoCreateInstance (CLSID_DMOWrapperFilter, NULL, CLSCTX_INPROC, IID_IBaseFilter, (void **) & amp; pFilter);
IDMOWrapperFilter * pWrap;
pFilter- & gt; QueryInterface (IID_IDMOWrapperFilter, (void **) & amp; pWrap);
DEFINE_GUID (CLSID_MP3DECODERDMO, 0x6b928210, 0x84e7, 0x4930, 0x9b, 0x33, 0x1e, 0xb6, 0xf0, 0x2b, 0x52, 0x6e);
pWrap- & gt; Init (CLSID_MP3DECODERDMO, DMOCATEGORY_AUDIO_DECODER); // CLSID_MP3DECODERDMO
GUID value is found in the registrypGraphBuilder- & gt; AddFilter (pFilter, L "My MPEG-1 Layer 3 Decoder DMO");
Last call pGraphBuilder- & gt; Render (poutPin);
The return value is obtained VFW_E_CANNOT_CONNECT, it is the lack of the middle of the Filter, unable to connect.
I checked on the front Windows2000 system that automatically help me load two Filter: MPEG1 Splitter and Default DirectSound, the PPC2005 have not achieved not even registered, although WM500 comes uuids.h can be found in two Filter's definition of a GUID:
OUR_GUID_ENTRY (CLSID_MPEG1Splitter,
0x336475d0, 0x942a, 0x11ce, 0xa8, 0x70, 0x00, 0xaa, 0x00, 0x2f, 0xea, 0xb5)
OUR_GUID_ENTRY (CLSID_DSoundRender,
0x79376820, 0x07D0, 0x11CF, 0xA2, 0x4D, 0x0, 0x20, 0xAF, 0xD7, 0x97, 0x67)
So I would like to ask is: in addition to the PPC2005 Source Filter and mp3 decoder DMO Filter, there are what need to be added to the middle of Filter Graph? Or no longer require additional Filter, and only require some special handling it?
To be able to help solve the problem of a friend, we will send up another stick and then an additional 500 points! ! !
Reply:
I have encountered the same issues, concerns
Reply:
Have tried, ppc is not put on directshow mp3's
Reply:
At least to a AUDIO RENDER FILTER it.
Reply:
I think the key should be what kind of Filter or other special handling needs between SourceFilter and mp3 decoder DMO. Continue to wait for the experts.
Reply:
I think the key should be what kind of Filter or other special handling needs between SourceFilter and mp3 decoder DMO. Continue to wait for the experts.
-------------------------------------------------- ----------------------------------
You said that there is a top MPEG1 Stream Splitter, according to my understanding, this is a file transfer media stream into the converter, which is an explanation FILTER media files, if the system does not provide for themselves to find an open source library package a FILTER not? But if you really use other open source libraries to do with the meaning of words DIRECT SHOW's also insignificant. Architecture becomes clearer and easier. There is a powerful open source player TCPMP, you DOWN to see.
Reply:
First find MPEG1 Layer-3 Decoder's CLSID, here I supposed to have been found, called CLSID_MP3Filter.
IBaseFilter * pFilter = NULL;
hr = CoCreateInstance (CLSID_MP3Filter,
NULL,
CLSCTX_INPROC,
IID_IBaseFilter,
reinterpret_cast & lt; VOID ** & gt; (& amp; pFilter)
);
if (SUCCEEDED (hr))
{
IFileSourceFilter * pFileSource = NULL;
if (SUCCEEDED (pFilter- & gt; QueryInterface (IID_IFileSourceFilter, reinterpret_cast & lt; VOID ** & gt; (& amp; pFileSource))))
{
hr = pFileSource- & gt; Load (_T ("\\ 1.mp3"), NULL);
IEnumPins * pTest = NULL;
IPin * pPin = NULL;
ULONG ulCount = 0;
if (S_OK == (hr = pGraphBuilder- & gt; AddFilter (pFilter, _T ("MP3"))))
{
if (S_OK == (hr = pFilter- & gt; EnumPins (& amp; pTest)))
{
if (S_OK == (hr = pTest- & gt; Next (1, & amp; pPin, & amp; ulCount)))
{
hr = pGraphBuilder- & gt; Render (pPin);
pPin- & gt; Release ();
hr = S_OK;
}
pTest- & gt; Release ();
}
}
if (pFileSource)
pFileSource- & gt; Release ();
}
if (pFilter)
pFilter- & gt; Release ();
}
Only casually even a pin, if there is more than one, then, must render
Reply:
I wondered not, try
Reply:
make
Reply:
I think the key should be what kind of Filter or other special handling needs between SourceFilter and mp3 decoder DMO. Continue to wait for the experts.
-------------------------------------------------- ----------------------------------
You said that there is a top MPEG1 Stream Splitter, according to my understanding, this is a file transfer media stream into the converter, which is an explanation FILTER media files, if the system does not provide for themselves to find an open source library package a FILTER not? But if you really use other open source libraries to do with the meaning of words DIRECT SHOW's also insignificant. Architecture becomes clearer and easier. There is a powerful open source player TCPMP, you DOWN to see.
-------------------------------------------------- ----------------------------------
TCPMP itself is open source, but its mandate seems to be only for the player itself, that is, you can modify its code, but the premise is to provide must still be a player, and it seems to have used a number of third-party plug-ins, if you want to It's just part of the code to intercept my program, I do not know whether there is a problem of infringement. But still very grateful dick_song (Caffey partners) let me know TCPMP this tool.
Reply:
Reply yzx0023 (bored off): I have already said in the question, PPC2005 mp3 decoder does not provide direct, but packaged in a so-called in DMO. Currently SourceFilter and Filter contains the mp3 decoder DMO can create it, but failed in the Render SourceFilter output Pin when the reason for failure is the lack of the middle of the Filter.
But you mentioned "only casually even a pin, if there is more than one, then, should render" I do not understand. SourceFilter have a mp3 of a plurality of output Pin exist?
Reply:
I have encountered this problem, I do not know CLSID_AudioRender this is not directly as a Rendering filter, when I used this way, but also prompted the two filter can not be directly connected, you also need an intermediate filter. In addition, the platform build CLSID_MPEG1Splitter there is this, do not know how to use? You can exchange together Oh! My MSN: kongpengsh@hotmail.com
Reply:
Results posted!
Unfortunately ing ...
Reply:
???
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment