Re: Application crashes while releasing IMediaSeeking interface



On Thu, 28 Feb 2008 09:18:31 -0800 (PST), ratnasinghal@xxxxxxxxx wrote:

I am working on a media player usings Directshow 9.0. I have a Stop
button which stops the current playback and releases all the
interfaces.

Firstly, use smart COM pointers (see my FAQ through the link below).

Secondly, you do not need to keep an IMediaSeeking interface around, just
QI for it when you need it:


HRESULT CMyClass::SetTime(REFERENCE_TIME& now)
{
CComQIPtr<IMediaSeeking> seeking(m_graph_builder); // m_graph_builder is
CComPtr<IGraphBuilder>
return seeking->SetPositions(
&now, AM_SEEKING_AbsolutePositioning,
NULL, AM_SEEKING_NoPositioning);
}

Thirdly, there may be a bug with the Lynx Two sound card. See if the
manufacturer has driver updates available.

--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
.



Relevant Pages

  • Re: FAQ 2.6 What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/...
    ... Putting dates in the faq like this invariably makes the faq look dated unless ... interfaces; networking, devices, and interprocess communication; data ... type utilities; database interfaces; user interfaces; interfaces to ... other languages; filenames, file systems, and file locking; ...
    (comp.lang.perl.misc)
  • Re: FAQ: How do I find out my IP address
    ... :} As per the faq, I tried running the sample program, and I ... :} is, naturally, what the faq sample program finds and resolves - but I ... A machine can have several interfaces, ... the addresses the machine is identified on the internet. ...
    (comp.lang.perl.misc)
  • Re: is avoiding compat ioctls possible?
    ... If you use pointers in your interfaces in any way, ... a u32 inside of the drm_radeon_info structure for the kernel ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: is avoiding compat ioctls possible?
    ... If you use pointers in your interfaces in any way, ... a u32 inside of the drm_radeon_info structure for the kernel ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: do need Interfaces for COM
    ... > chapter about Interfaces in Dale Rogerson's Inside COM, ... > the Function pointers instead of Interface pointers?? ... which is discussed in this newsgroup. ... C++ Faq: http://www.parashift.com/c++-faq-lite C Faq: http://www.eskimo.com/~scs/c-faq/top.html alt.comp.lang.learn.c-c++ faq: ...
    (comp.lang.cpp)