Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attempting to Play Media File
Message
De
04/12/2005 00:36:34
Graham Trott
Hamilton Pc Repair
Ontario, Canada
 
 
À
03/12/2005 21:57:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01074681
Message ID:
01074694
Vues:
31
Installed a filter to allow the unzipping and playing of the zip files in media player. These zipped files consist of an mp3 and a karaoke screen file. Excerpts from the documentation are as follows

->Description
-----------
Unzip Filter is a DirectShow filter that can unzip incoming stream of ZIP file into a number of output streams. The filter connects to IAsyncReader sources and exposes IAsyncReader interfaces on all of its output pins. The filter also exposes a number of interfaces for accessing ZIP archive at any time after the input pin is connected and for controlling how many output pins is created. For more details see below Using Unzip Filter.
<-

and then

->Installation
------------
To install the filter one has to do few steps:
1. copy the file unzip.ax and zip.dll to the target directory
2. call DLL registration (e.g. regsvr32 unzip.ax)
3. bind ZIP stream data to Unzip filter by adding the following registry keys:

[HKEY_CLASSES_ROOT\Media Type\{e436eb83-524f-11ce-9f53-0020af0ba770}\{9fb4b36d-9661-408e-a58e-25ee4fb03fcd}]
"0"="0,4,,544B0304"

Using Unzip Filter
------------------
Since playing back .zip files is rather an odd thing, since the majority of .zip archives contains unplayable data, Unzip Filter does not expose any output pins after the input pin is connected. To make sure what files of the input .zip archive are to be output it asks Zip Filters to specify what files can be played back and to suggest media type.

Zip Filters are COM classes that implement IZipFilter interface. Zip Filters must register themselves as follows:

[HKEY_CLASSES_ROOT\CLSID\{9fb4b36d-9661-408e-a58e-25ee4fb03fcd}\ZipFilters]
"MyFilter0"="{1387bd6f-8146-44bf-a866-603a5237409e}"
"MyFilter1"="{88405DDC-DFD6-42f3-B602-1D3E875D8C23}"

When Unzip Filter filters input archive it calls consequently all filters until a Zip Filter returns S_OK and the number of exposed pins is non zero. Be careful if you provide several zip filters.

When called Zip Filter receives an array of ZipEntries. The filter must decide what entries can be rendered. If an entry is worth rendering it sets bExpose field to TRUE. If the suggested stream subtype is not valid, the filter can set actual subtype to what suits better. If the filter encounters an error it should return an error value, if it cannot find any files to play back in this archive it should return S_FALSE.

Zip Filter also receives IZipArchive interface pointer which can be used to access actual data of the archive.

The number of output pins is limited. Internally Unzip Filter manages up to 32 concurrent archive decoding streams. The streams are used by output pins and by IZipInputStream objects. The number can only be increased with recompilation.
<-

I am sure that the interface does not recognize what is happening as the files will play if loaded directly into Media Player or dropped onto Media Player.

What I was hoping for was the ability to open the file in an embedded player on a form. Thanks for taking the time to read this.

>>Create an instance of media player as below
>>
>>Omedia = CreateObject("Mediaplayer.Mediaplayer")
>>
>>Omedia.open("e:\sample.zip")
>>Omedia.play
>>and get unknown com status code 0x800a0005
>>
>>This file will play in Media Player through the standard file open dialog.
>>
>>Any help would be appreciated. Thanks
>
>Don't you have to decompress the file first?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform