Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. SharpDX MediaFoundation and DirectShow

SharpDX MediaFoundation and DirectShow

Scheduled Pinned Locked Moved Graphics
graphicsquestiongame-devperformance
9 Posts 5 Posters 26 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RWey
    wrote on last edited by
    #1

    I'm somewhat new to DirectX programming and need a bit of guidance. My requirement is currently limited to video and 2D drawing and so far I've managed to get SharpDX to play a video from a file without problems, and also have been able to do my 2D drawing. This was simple enough and the performance is good. Ultimately, my video source will need to be video input devices ( i.e. web cams, video capture cards, etc. ). My question is: Does SharpDX.MediaFoundation include DirectShow wrappers such that I can access and play video from local video input devices? If so, can someone point me in the right direction and link some examples of using SharpDX for this purpose? Many thanks.

    D 1 Reply Last reply
    0
    • R RWey

      I'm somewhat new to DirectX programming and need a bit of guidance. My requirement is currently limited to video and 2D drawing and so far I've managed to get SharpDX to play a video from a file without problems, and also have been able to do my 2D drawing. This was simple enough and the performance is good. Ultimately, my video source will need to be video input devices ( i.e. web cams, video capture cards, etc. ). My question is: Does SharpDX.MediaFoundation include DirectShow wrappers such that I can access and play video from local video input devices? If so, can someone point me in the right direction and link some examples of using SharpDX for this purpose? Many thanks.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Quote:

      NOTE: As of 29 Mar 2019, SharpDX is no longer being under development or maintenance

      Are you sure you still want to go down SharpDX path? Sadly, the only .NET wrapper for DirectX anything that I know of, that is still in development, DirectN[^].

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
      Dave Kreskowiak

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Quote:

        NOTE: As of 29 Mar 2019, SharpDX is no longer being under development or maintenance

        Are you sure you still want to go down SharpDX path? Sadly, the only .NET wrapper for DirectX anything that I know of, that is still in development, DirectN[^].

        Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
        Dave Kreskowiak

        R Offline
        R Offline
        RWey
        wrote on last edited by
        #3

        I understand it's no longer supported, but it's battle tested and I don't think the risk at present is any greater than investing in the "latest and greatest" GUI framework only to have it killed off before it gets off the ground. Besides, I feel if I use SharpDX to get a better handle on the underlying concepts, porting to something new(er) when required would be easier. As to my original question, I know there's other NuGet packages that make easy work of displaying camera input ( i.e. AForge, Accord ), but I'm not convinced they're taking full advantage of the GPU, which is what I'm looking for. Specifically, I need to route the capture byte stream directly to the mediaengine's render surface as I'll be dealing with larger sizes and framerates.

        Regards, R. Wey

        L 1 Reply Last reply
        0
        • R RWey

          I understand it's no longer supported, but it's battle tested and I don't think the risk at present is any greater than investing in the "latest and greatest" GUI framework only to have it killed off before it gets off the ground. Besides, I feel if I use SharpDX to get a better handle on the underlying concepts, porting to something new(er) when required would be easier. As to my original question, I know there's other NuGet packages that make easy work of displaying camera input ( i.e. AForge, Accord ), but I'm not convinced they're taking full advantage of the GPU, which is what I'm looking for. Specifically, I need to route the capture byte stream directly to the mediaengine's render surface as I'll be dealing with larger sizes and framerates.

          Regards, R. Wey

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Add WPF to your search keywords. directx4wpf [CodePlex Archive](https://archive.codeplex.com/?p=directx4wpf) [c# - Attach DirectShow video window to WPF Control - Stack Overflow](https://stackoverflow.com/questions/39604743/attach-directshow-video-window-to-wpf-control)

          It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

          R S 2 Replies Last reply
          0
          • L Lost User

            Add WPF to your search keywords. directx4wpf [CodePlex Archive](https://archive.codeplex.com/?p=directx4wpf) [c# - Attach DirectShow video window to WPF Control - Stack Overflow](https://stackoverflow.com/questions/39604743/attach-directshow-video-window-to-wpf-control)

            It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

            R Offline
            R Offline
            RWey
            wrote on last edited by
            #5

            I'm using WinForms (yeah, I know ... old school), tho I don't think that makes much difference as in the end its simply the window/control Handle that has to be specified as the swapchain.OuputHandle. I'm doing that already for playing a video file as a test and performance is very good. When looking through SharpDX.MediaFoundation with Reflector, I get the strong feeling it provides the means for capture input, but I can't find any complete examples in that specific area.

            Regards, R. Wey

            D K 2 Replies Last reply
            0
            • R RWey

              I'm using WinForms (yeah, I know ... old school), tho I don't think that makes much difference as in the end its simply the window/control Handle that has to be specified as the swapchain.OuputHandle. I'm doing that already for playing a video file as a test and performance is very good. When looking through SharpDX.MediaFoundation with Reflector, I get the strong feeling it provides the means for capture input, but I can't find any complete examples in that specific area.

              Regards, R. Wey

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              And herein lies the problem with using a library that's been dead in the water for two years, lack of support. I can't help you as I've never used the thing.

              Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
              Dave Kreskowiak

              R 1 Reply Last reply
              0
              • D Dave Kreskowiak

                And herein lies the problem with using a library that's been dead in the water for two years, lack of support. I can't help you as I've never used the thing.

                Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                Dave Kreskowiak

                R Offline
                R Offline
                RWey
                wrote on last edited by
                #7

                No problem. Given that it saw over 2.5 million downloads, I figured there might be somebody that used it for this purpose and I don't think DirectX11 is going anywhere any time soon. As for newer platforms, I unfortunately don't have a lot of experience with them so I'm concerned about the stumbling block that would present and not knowing their limitations. I could struggle my way thru UWP, but using what accelerated graphics API? Win2D? WinUI3? DirectN ? It's hard to know which platform to choose that will still be around by the time I learn it.

                Regards, R. Wey

                1 Reply Last reply
                0
                • L Lost User

                  Add WPF to your search keywords. directx4wpf [CodePlex Archive](https://archive.codeplex.com/?p=directx4wpf) [c# - Attach DirectShow video window to WPF Control - Stack Overflow](https://stackoverflow.com/questions/39604743/attach-directshow-video-window-to-wpf-control)

                  It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                  S Offline
                  S Offline
                  SEO3 Softrix
                  wrote on last edited by
                  #8

                  Cool

                  1 Reply Last reply
                  0
                  • R RWey

                    I'm using WinForms (yeah, I know ... old school), tho I don't think that makes much difference as in the end its simply the window/control Handle that has to be specified as the swapchain.OuputHandle. I'm doing that already for playing a video file as a test and performance is very good. When looking through SharpDX.MediaFoundation with Reflector, I get the strong feeling it provides the means for capture input, but I can't find any complete examples in that specific area.

                    Regards, R. Wey

                    K Offline
                    K Offline
                    K3 Reviews
                    wrote on last edited by
                    #9

                    seems nice

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups