Solved

How to grab still images from ASF files or WMV files.

Posted on 2002-05-22
5
619 Views
Last Modified: 2012-06-27
Hi experts.
I'm a rookie in DirectX Show. I have question. How can I capture still images from ASF files or WMV files.
I used to try IMediaDet, but I failed. When I take advantage of IMediaDet::put_Filename, the HRESULT always tells me a VFW_E_CERTIFICATION_FAILURE error. I dunno why. Can anybody tell the how to do the task? Thanks.

(To me, it's a very hard question)
0
Comment
Question by:FierceBison
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
lyonst earned 200 total points
ID: 7026519
You should probably start with MSDN ..

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/htm/ifiltergraphaddfilter.asp

The Error is as follows :

VFW_E_CERTIFICATION_FAILURE

Use of this filter is restricted by a software key. The application must unlock the filter.

__________

You should get some help here..

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/htm/imediadetget_framerate.asp

Microsoft DirectX 8.1 (C++)

IMediaDet::put_Filter
The put_Filter method specifies a source filter for the media detector to use.

Syntax

HRESULT put_Filter(
    IUnknown *newVal
);

Parameters

newVal

[in] Pointer to the source filter's IUnknown interface.

Return Value

Returns an HRESULT value. Possible values include the following:

Value Description
S_OK Success.
E_NOINTERFACE newVal does not point to a filter.
E_POINTER NULL pointer argument.


Remarks

Instead of calling IMediaDet::put_Filename, an application can call this method with a pointer to a source filter's IUnknown interface. Do not use a filter already connected to the filter graph.


IMediaDet::put_Filename
The put_Filename method specifies the name of the source file for the media detector to use.

Syntax

HRESULT put_Filename(
    BSTR newVal
);

Parameters

newVal

[in] File name of the source.

Return Value

Returns S_OK if successful. Otherwise, returns an HRESULT value indicating the cause of the error.

Cheers,

T.
0
 
LVL 15

Expert Comment

by:lyonst
ID: 7029340
Any update ??
0
 

Author Comment

by:FierceBison
ID: 7030927
Don't you think I have to get a software key for Windows Media Format SDK?. But I think what I do is just an ASF Reader not an ASF Writer. Anyway, whether I use ::put_Filename or ::put_Filter, I always get that error code. I'm vexed.
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7031940
FierceBison

Could you please explain why expert lyonst only received a "C" grade for his answer? Please provide feedback if you are not happy with an answer and our experts will try to clarify their comments.
Here are the guidelines for grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.

** Mindphaser - Community Support Moderator **
0
 

Author Comment

by:FierceBison
ID: 7036242
Thank you. But because I think that's not a clear answer. I'm sure where I can find Help from MSDN. But the VFW_E_CERTIFICATION_FAILURE is the problem. So I commented above:

"Don't you think I have to get a software key for Windows Media Format SDK?. But I think what I do is
just an ASF Reader not an ASF Writer. Anyway, whether I use ::put_Filename or ::put_Filter, I always
get that error code. I'm vexed."

I think the question might be a piece of cake. Just a software key. Maybe I could solve it as below:

#ifdef USE_WMF_CERT
    // set the site provider on the MediaDet object to allowed keyed apps to use ASF decoder
    CComQIPtr< IObjectWithSite, &IID_IObjectWithSite > pOWS( pDet );
    if( pOWS )
    {
        pOWS->SetSite( (IServiceProvider *) &g_prov );
    }
#endif // USE_WMF_CERT
    hr = pDet->put_Filename(...) or pDet->put_Filter(...);

But of course, I'm not sure.
Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Learn how to create interesting presentations by including videos to keep your audience engaged using Prezi. Select "Insert" from the top menu in your Prezi editor: Select "YouTube Video": Paste the video URL into the prompt: "Select "Insert":…
Learn the basics of inputting and editing your text components in Prezi. We will cover how to set styles, position, and group your text components. In your Prezi editor, click anywhere on the canvas to add text: A flashing cursor informs you that yo…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question