?
Solved

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

Posted on 2002-05-22
5
Medium Priority
?
646 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 400 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.
Suggested Courses

864 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