Solved

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

Posted on 2002-05-22
5
605 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

I've been using this technique since Adobe CS2, and it should work with any version of Illustrator that includes the appearance panel. In this tutorial we'll create a button using the appearance panel in Adobe Illustrator, and then save it as a r…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now