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. C / C++ / MFC
  4. DirectShow Video Playback from memory

DirectShow Video Playback from memory

Scheduled Pinned Locked Moved C / C++ / MFC
performancequestionannouncement
5 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    sdancer75
    wrote on last edited by
    #1

    Hi, Until now I used MCI to playback my videos directly from memory. I used this trick, because my avi's where inside a huge file archive, so I read them directly without any extraction. Now I want to update my code to use DirectShow for video playback, but it lacks a callback functionality like mmioInstallIOProc. Is there any approach in my situation ? Regards, George

    sdancer75

    C 1 Reply Last reply
    0
    • S sdancer75

      Hi, Until now I used MCI to playback my videos directly from memory. I used this trick, because my avi's where inside a huge file archive, so I read them directly without any extraction. Now I want to update my code to use DirectShow for video playback, but it lacks a callback functionality like mmioInstallIOProc. Is there any approach in my situation ? Regards, George

      sdancer75

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      1. Google for DirectShow input filters that can read from memory OR 2. try writing your own filter to stream data from memory

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

      S 1 Reply Last reply
      0
      • C Code o mat

        1. Google for DirectShow input filters that can read from memory OR 2. try writing your own filter to stream data from memory

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

        S Offline
        S Offline
        sdancer75
        wrote on last edited by
        #3

        Yes, i suppose this is what I am gonna do..... I just wished to avoid time and effort in case there was something already out there that did the trick.

        sdancer75

        C 1 Reply Last reply
        0
        • S sdancer75

          Yes, i suppose this is what I am gonna do..... I just wished to avoid time and effort in case there was something already out there that did the trick.

          sdancer75

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          That's understandable, i tried googling around some too but didn't really find anything readymade either. I can think of two alternatives to writing your own source filter: 1. Extract your videos into some temporary files and play those from the file system, this can be a bit costy in both time and resource wise (you need time to extract the videos to temp files and you will need extra disk space for the videos) but i supose this is quite a straightforward solution. Alternatively you might try using a named pipe and specifying that as the source for the file reader filter, no idea if that would work or not, never tried, but i kinda suspect it wouldn't work. 2. Implement a "small" HTTP server in your application that can stream the video from your big file and try to render the stream with DirectShow like "http:\\localhost:12345\a.avi" or somesuch. This might be more work than just writing the filter though. Good luck.

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

          S 1 Reply Last reply
          0
          • C Code o mat

            That's understandable, i tried googling around some too but didn't really find anything readymade either. I can think of two alternatives to writing your own source filter: 1. Extract your videos into some temporary files and play those from the file system, this can be a bit costy in both time and resource wise (you need time to extract the videos to temp files and you will need extra disk space for the videos) but i supose this is quite a straightforward solution. Alternatively you might try using a named pipe and specifying that as the source for the file reader filter, no idea if that would work or not, never tried, but i kinda suspect it wouldn't work. 2. Implement a "small" HTTP server in your application that can stream the video from your big file and try to render the stream with DirectShow like "http:\\localhost:12345\a.avi" or somesuch. This might be more work than just writing the filter though. Good luck.

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

            S Offline
            S Offline
            sdancer75
            wrote on last edited by
            #5

            Thanks for the reply. I already thought both of your solutions you suggest. The 1st is abandoned from the very beggining since the archive file is delivered in retail-DVD and as you can imagine the time needed to extract it in the hard disk is critical. The 2nd solution is also rejected, since this is a retail product and the configuration of end computer is unknown, any anti-virus or general other protection software may block my application to work as it expected. So I think a custom filter in my case is more than imperative. Thanks anyway,

            sdancer75

            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