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. multiple monitors and videowindow.owner

multiple monitors and videowindow.owner

Scheduled Pinned Locked Moved Graphics
helptutorialquestion
5 Posts 2 Posters 12 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.
  • W Offline
    W Offline
    wjp
    wrote on last edited by
    #1

    hello, can someone tell me how to to render a movie onto two monitors, i've a bit of code that reners the file on a picturebox. When i tell my computer to use two videocards and do the same thing on each screen, only the main screen shows the video / movie. the other shows a black hole. how can i solve that problem. FilgraphManager graphManager = new FilgraphManager(); graphManager.RenderFile(file); // Attach the view to a picture box on the form. try { videoWindow = (IVideoWindow)graphManager; videoWindow.Owner = (int)pictureBox1.Handle; videoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN; videoWindow.SetWindowPosition( pictureBox1.ClientRectangle.Left, pictureBox1.ClientRectangle.Top, pictureBox1.ClientRectangle.Width, pictureBox1.ClientRectangle.Height); } catch { // An error can occur if the file does not have a video // source (for example, an MP3 file.) // You can ignore this error and still allow playback to // continue (without any visualization). } mediapos = (IMediaPosition)graphManager; imex = (IMediaEventEx)graphManager; imex.SetNotifyWindow((int)this.Handle, WM_GRAPHNOTIFY, 0); // Start the playback (asynchronously). mc = (IMediaControl)graphManager; mc.Run(); willem-jan

    M 1 Reply Last reply
    0
    • W wjp

      hello, can someone tell me how to to render a movie onto two monitors, i've a bit of code that reners the file on a picturebox. When i tell my computer to use two videocards and do the same thing on each screen, only the main screen shows the video / movie. the other shows a black hole. how can i solve that problem. FilgraphManager graphManager = new FilgraphManager(); graphManager.RenderFile(file); // Attach the view to a picture box on the form. try { videoWindow = (IVideoWindow)graphManager; videoWindow.Owner = (int)pictureBox1.Handle; videoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN; videoWindow.SetWindowPosition( pictureBox1.ClientRectangle.Left, pictureBox1.ClientRectangle.Top, pictureBox1.ClientRectangle.Width, pictureBox1.ClientRectangle.Height); } catch { // An error can occur if the file does not have a video // source (for example, an MP3 file.) // You can ignore this error and still allow playback to // continue (without any visualization). } mediapos = (IMediaPosition)graphManager; imex = (IMediaEventEx)graphManager; imex.SetNotifyWindow((int)this.Handle, WM_GRAPHNOTIFY, 0); // Start the playback (asynchronously). mc = (IMediaControl)graphManager; mc.Run(); willem-jan

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Check out the IVMRMonitorConfig interface. Mark

      Great job, team. Head back to base for debriefing and cocktails.

      W 1 Reply Last reply
      0
      • M Mark Salsbery

        Check out the IVMRMonitorConfig interface. Mark

        Great job, team. Head back to base for debriefing and cocktails.

        W Offline
        W Offline
        wjp
        wrote on last edited by
        #3

        Please can you help me some more, i'm new to directx and i think i'm gettinig it a litle bit. On a wxp machine i'm not using the extended monitor option. Both monitors show the same app and picturebox of course. It seems strange to me that any picture, shown in the picturebox shows up in both the screens, but when rendering a video by direct x it won't show on the second screen. You answered me (thanx) to do something with the "IVMRMonitorConfig interface" bth where in the code should i do what to get there?

        M 1 Reply Last reply
        0
        • W wjp

          Please can you help me some more, i'm new to directx and i think i'm gettinig it a litle bit. On a wxp machine i'm not using the extended monitor option. Both monitors show the same app and picturebox of course. It seems strange to me that any picture, shown in the picturebox shows up in both the screens, but when rendering a video by direct x it won't show on the second screen. You answered me (thanx) to do something with the "IVMRMonitorConfig interface" bth where in the code should i do what to get there?

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          XP uses the Video Mixing Renderer 7 (VMR-7) filter for video rendering by default. You could eumerate the filters in the graph and find the VMR-7 filter and obtain the IVMRMonitorConfig interface from it. I'm not sure how you'd do it on two monitors, both displaying the same. You have two separate video adapters you said, right? Maybe in that case you'd need two renderers, both set to the same window, but configured to display on different monitors. If that doesn't work, then another (possibly simpler) solution is to implement your own video renderer filter using GDI instead of DirectX for drawing. That will draw to both just as picture's (bitmaps) do.

          Great job, team. Head back to base for debriefing and cocktails.

          W 1 Reply Last reply
          0
          • M Mark Salsbery

            XP uses the Video Mixing Renderer 7 (VMR-7) filter for video rendering by default. You could eumerate the filters in the graph and find the VMR-7 filter and obtain the IVMRMonitorConfig interface from it. I'm not sure how you'd do it on two monitors, both displaying the same. You have two separate video adapters you said, right? Maybe in that case you'd need two renderers, both set to the same window, but configured to display on different monitors. If that doesn't work, then another (possibly simpler) solution is to implement your own video renderer filter using GDI instead of DirectX for drawing. That will draw to both just as picture's (bitmaps) do.

            Great job, team. Head back to base for debriefing and cocktails.

            W Offline
            W Offline
            wjp
            wrote on last edited by
            #5

            i'll try, thanxs

            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