locked
How to use DirectShow from C#? RRS feed

  • Question

  • Hello.It is possible to use DirectShow from .NET C# 2008.I don't want to use DirectShow.NET. I have already an application made in C# 2008 with WPF and now I need a lot of things that are available in DirectShow.I can't rewrite my app in C++.How can I use it.Please give some advices, tutorials, book, anything.THANKS
    Thursday, December 27, 2007 7:05 PM

Answers

  • Use DirectShow.NET or at least use the type libraries from it.  Why do you not want to use it?

     

    Thursday, December 27, 2007 7:10 PM
  • 1) Most, but not all.  Everything we could find that was actually implemented somewhere.  There is a list of what interfaces are supported included with the (free) download.

    2) It is a dll that needs to be copied on to the user's computer.  No particular registration is required.

    3) No more difficult than DirectShow itself.

     

    Check out the software, docs, and forum over at http://DirectShowNet.SourceForge.Net

     

    ---

    Co-Author DirectShowNet

    Thursday, December 27, 2007 8:58 PM

All replies

  • Use DirectShow.NET or at least use the type libraries from it.  Why do you not want to use it?

     

    Thursday, December 27, 2007 7:10 PM
  • I have a lot of question about DirectShow .NET
      1 - It offers all the capabilities of DirectShow
      2 - It's necessary that the enduser install it?
      3 - It's difficult?

      In this moment I really don't know what to choice..and I need a little help
    Thursday, December 27, 2007 7:24 PM
  • And I have another question.Is possible to write the code in C++ -> make a DLL -> Call the dll from C#?
    Thursday, December 27, 2007 7:38 PM
  • 1) Most, but not all.  Everything we could find that was actually implemented somewhere.  There is a list of what interfaces are supported included with the (free) download.

    2) It is a dll that needs to be copied on to the user's computer.  No particular registration is required.

    3) No more difficult than DirectShow itself.

     

    Check out the software, docs, and forum over at http://DirectShowNet.SourceForge.Net

     

    ---

    Co-Author DirectShowNet

    Thursday, December 27, 2007 8:58 PM
  • Yes.

     

    ---

    Co-Author DirectShowNet

     

    Thursday, December 27, 2007 8:58 PM
  • LGS responded to the OP's 3) point:  "No more difficult than DirectShow itself."

    I thought the object of the DirectShowNet.dll was to make interfacing with DirectShow easier.  Why use it if it's just as difficult?

    For a good example of using DirectShow from C# look at Toub's "Fun with DVR-MS" on his blog.
    Saturday, December 29, 2007 7:39 PM
  • The first goal of DirectShowNet was to make using DirectShow from .Net *possible*.

     

    Lots of people have bits and pieces of DS they have made available.  An interface here and another one there.  Some methods of those interfaces working, some methods not.

     

    The goal of DSN was to provide access to ALL the interfaces, and to test ALL the methods of each interface.  And to  define all the structures and enums needed by each of those methods.  Oh, yes, and to provide a central, updatable place to collect corrections.

     

    All this available at no charge, with source code included, along with ~30 samples showing how to use a number of the different functional areas.

     

    Now, that isn't to say that building something on top of DSN isn't a good idea.  There's lots of wrapper classes that could be hung on top.  However, anyone that wants to call DS from .Net is going to have to start by having the interface definitions, and *that's* what DSN provides.

     

    ---

    Co-Author DirectShowNet

    Saturday, December 29, 2007 9:59 PM
  •  JohnWein wrote:

    LGS responded to the OP's 3) point:  "No more difficult than DirectShow itself."

    I thought the object of the DirectShowNet.dll was to make interfacing with DirectShow easier.  Why use it if it's just as difficult?

    For a good example of using DirectShow from C# look at Toub's "Fun with DVR-MS" on his blog.

     

    C# with DirectShowNet.dll (and Delphi with DSPack) make DS programming a little easier as you do not need to handle Addref() and Release() - but you get nearly the same in C++ using smart pointers.

     

    And, whether you use C#, C++ or Delphi, you still have to understand the mechanisms of DirectShow. These do not change, whatever the language you use.

     

    Then you have the respective benefits (and drawbacks) of each language for the non DS-specific part of your processing. Endless debate.

    Saturday, December 29, 2007 10:10 PM
  • LGS:

    Don't you think you might have made using DirectShow a little easier then?  Without your wrapper, I would have to study and write every interface myself.  I use VB and I guess I don't really understand the mechanisms of DirectShow, but I can use your dll and do everything the SDK says I can.  I thank you for the time and effort you have put into the project. I was trying to point out in my previous post that you weren't taking enough credit for making DirectShow readily accessable to .Net programmers.

    Saturday, December 29, 2007 10:31 PM


  • "Don't you think you might have made using DirectShow a little easier then? "

    Easier than what? Directshow?

    The easy functionality that you are missing is what?


    Sunday, December 30, 2007 7:27 AM
  • I think this is a language thing.

     

    I believe John was implying that DirectShow.net has made things easier.

     

    Monday, December 31, 2007 4:45 PM
  • two question about DirectShowNet.

    Sure it is easier than using SDK DirectShow but is it possible to create virtual webcam from a real one and to add another input video device?

    is it possible to tranform a RTSP (IP) camera into another virtual webcam?

    Thank you guys!

    Tuesday, April 17, 2012 9:38 AM
  • Since DirectShow.NET is under LGPL, it is in theory not really free software. If you want to use it in developing your proprietary, or commercial software, you must be careful to go with DirectShow.NET.  

    Frankle

    Tuesday, September 25, 2012 3:04 PM