Recent experiences (COM, DirectShow)

Source: Internet
Author: User

There is always a problem with the release of dshow written in the past two days.

Igraphbuilder-> release () will die in this sentence!

In the first place, I thought it could be a reference count problem. So I looked for it carefully.

The process of searching is always progress and process. This is also because I have figured out the addition and deletion of reference count.

1. If ccomptr <ixxx> pxxx is used, when pxxx = pxxx2, 1 is added to the reference count.

2. If cocreateinterface and QueryInterface are successful, the reference count is increased by 1.

3. If ixxx * pxxx is used, the reference count remains unchanged when pxxx = pxxx2.

4. If the in-process filter is used, when pxxx = new CXXX (), the reference count is not increased, and the value is 0.

In this process, an error is also found, which solves the problem of igraphbuilder-> release,

In the process of writing the filter, make sure that each return location is in the heavy load of cbasefilter: Stop,

You must call return cbasefilter: Stop ()

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.