Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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.
In this Micro Tutorial viewers will learn the basic shortcuts and functions of Illustrator. The viewer will learn about the paintbrush tool, anchor points, font sizing, and more.
In addition to being a great web-based presentation tool, Prezi also makes it easy to save your presentation as a PDF to share with others as well. Learn how in this tutorial. Select the share icon from the top menu in your Prezi editor: Select "D…

895 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

14 Experts available now in Live!

Get 1:1 Help Now