Results 1 to 17 of 17

Thread: [SOLVED] DirectShow Video Player Inside Qt

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Angry [SOLVED] DirectShow Video Player Inside Qt

    I am trying to develop a video player using Qt and DirectShow. When I use queryInterface( ) from mpVideoPlayer which is a QAxWidget, I get NULL pointers. Whenever I use CoCreateInstance to create the first pointer, I get valid pointers for all my subsequent pointers, but this creates the video playing window in a separate window instead of inside my Qt GUI. So how do I get the UUID for a DirectShow inside Qt? How do I use setControl to act like CoCreateInstance( )? Any help and/or examples would be greatly appreciated. Below is my code for setting up the different pointers and running the video. Thanks!!!

    Qt Code:
    1. bool VideoViewerWindow::createVideo( QString filename )
    2. {
    3. int length = filename.size( ) + 1;
    4. WCHAR* wfile = new WCHAR[length];
    5. int i = 0;
    6. for( i = 0 ; i < filename.size( ) ; i++ )
    7. {
    8. wfile[i] = filename[i].toAscii( );
    9. }
    10. wfile[i] = '\0';
    11.  
    12. //mpVideoPlayer->setControl( "DirectShow" );
    13.  
    14. // Get the interface for DirectShow's GraphBuilder
    15. //CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
    16. // IID_IGraphBuilder, (void **)&pGraphBuilder);
    17. mpVideoPlayer->queryInterface( QUuid( IID_IGraphBuilder ), (void**) &pGraphBuilder );
    18.  
    19. pGraphBuilder->RenderFile( wfile, NULL );
    20.  
    21. // Query for the media control interfaces
    22. //mpVideoPlayer->queryInterface( QUuid( IID_IMediaControl ), (void **)&pMediaControl );
    23. pGraphBuilder->QueryInterface( IID_IMediaControl, (void **)&pMediaControl );
    24. pGraphBuilder->QueryInterface( IID_IMediaEventEx, (void **)&pMediaEvent );
    25. pGraphBuilder->QueryInterface( IID_IMediaSeeking, (void **)&pMediaSeeking );
    26. pGraphBuilder->QueryInterface( IID_IMediaPosition, (void **)&pMediaPosition );
    27.  
    28. // Query for video interfaces, which may not be relevant for audio files
    29. pGraphBuilder->QueryInterface( IID_IVideoWindow, (void **)&pVideoWindow );
    30. pGraphBuilder->QueryInterface( IID_IBasicVideo, (void **)&pBasicVideo );
    31.  
    32. // Query for audio interfaces, which may not be relevant for video-only files
    33. pGraphBuilder->QueryInterface( IID_IBasicAudio, (void **)&pBasicAudio );
    34.  
    35. getFrameStepInterface( );
    36.  
    37. pMediaControl->Run( );
    38.  
    39. return true;
    40. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: DirectShow Video Player Inside Qt

    Maybe you should use something other than "DirectShow" as a parameter of setControl() method?

    http://doc.trolltech.com/4.1/qaxbase.html#control-prop

  3. #3
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: DirectShow Video Player Inside Qt

    I am working with ToddAtWSU on this problem as well. We have tried a variety of UUID numbers found on the internet, in setControl(), each returns NULL. We cannot find a specific (UUID that works, there may be multiple I am not sure) or a class name for "DirectShow" like the MSCalendar example. The problem is that all the sample code for DirectShow is written using MFC, and each forum post that we have read only asks specific questions about after the video/audio is being played, not how they got it play initially. Essentially what we are looking for, is how to setup (we are assuming using setControl, but that may not be the correct method) the IGraphBuilder using a QAxWidget. We can get the code using the CoCreateInstance() from MFC, but that just draws the video outside of the QAxWidget. After we get the video setup, the rest of the code I understand (I HOPE!! ) . Thanks for the frequent responses jacek!!

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: DirectShow Video Player Inside Qt

    You should start with Windows Media Player. It's GUUIDs are easy to find (it has more than one of them), so you should be able to get it running in a short time. If you have trouble finding the right number, you might want to take a look at your OS registry to look which COM objects have been registered at all. There are their id there too, it should ease your job.

  5. #5
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: DirectShow Video Player Inside Qt

    WMP will not work (I dont think...) for our needs. Perhaps a bit of information is needed. We are developing an application to frameskip through an mpeg video. Very rarely will the video be just played through. When we were looking into the frameskipping of Media Player, many of those features are locked out when developing your own front end. When using DirectShow, at least in the MFC exmples we have ran, we have access to the frame properties of the video. We could be wrong in our asessment, we dont have much expirience with COM objects, please let me know. Also, the reason we are not using MFC for the interface, since that seems to be the faster route, is eventually this system may have to work in a UNIX environment. I know DirectShow is not portable, but I have looked into other UNIX solutions and do not want to re-develop the GUI.
    Thanks
    Last edited by Rayven; 4th April 2006 at 14:43. Reason: Added more background info

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: DirectShow Video Player Inside Qt

    How about this?
    Qt Code:
    1. mpVideoPlayer->setControl( QUuid( CLSID_FilterGraph ) );
    2. mpVideoPlayer->queryInterface( QUuid( IID_IGraphBuilder ), (void**) &pGraphBuilder );
    To copy to clipboard, switch view to plain text mode 

  7. The following user says thank you to jacek for this useful post:

    ToddAtWSU (24th April 2006)

  8. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: DirectShow Video Player Inside Qt

    Quote Originally Posted by Rayven
    WMP will not work (I dont think...) for our needs.
    But it's a good start to see if your approach is correct.

  9. #8
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post Re: DirectShow Video Player Inside Qt

    I got the WMP code to play the video, however, there is no access to the frame properties to directly control WMP.

    Jacek, the code you gave me does work, but I think there is something else I am missing. The video plays now, but it does not play within the Qt structure but outside in a new window. This is definatly one step closer to the solution though. Here is the code for what we have so far:
    Qt Code:
    1. mpFrame = new QFrame( this );
    2. mpFrame->setGeometry( QRect( 10, 41, 561, 351 ) );
    3. mpFrame->setFrameShape( QFrame::WinPanel );
    4. mpFrame->setFrameShadow( QFrame::Sunken );
    5.  
    6. mpVideoPlayer = new QAxWidget( mpFrame );
    7. mpVideoPlayer->setGeometry( QRect( 15, 46, 551, 341 ) );
    8.  
    9. :
    10. :
    11.  
    12. int length = filename.size( ) + 1;
    13. WCHAR* wfile = new WCHAR[length];
    14. int i = 0;
    15. for( i = 0 ; i < filename.size( ) ; i++ )
    16. {
    17. wfile[i] = filename[i].toAscii( );
    18. }
    19. wfile[i] = '\0';
    20.  
    21. // Get the interface for DirectShow's GraphBuilder
    22. mpVideoPlayer->setControl( QUuid( CLSID_FilterGraph ) );
    23. mpVideoPlayer->queryInterface( QUuid( IID_IGraphBuilder ), (void**) &pGraphBuilder );
    24.  
    25. // Query for the media control interfaces
    26. mpVideoPlayer->queryInterface( QUuid( IID_IMediaControl ), (void **)&pMediaControl );
    27. mpVideoPlayer->queryInterface( QUuid( IID_IMediaEventEx ), (void**)&pMediaEvent );
    28. mpVideoPlayer->queryInterface( QUuid( IID_IMediaSeeking ), (void **)&pMediaSeeking );
    29. mpVideoPlayer->queryInterface( QUuid( IID_IMediaPosition ), (void **)&pMediaPosition );
    30.  
    31. pGraphBuilder->RenderFile( wfile, NULL );
    32.  
    33. pMediaControl->Run( );
    To copy to clipboard, switch view to plain text mode 
    Is there something I am missing to place the video in the Qt window? I am thinking it is the RenderFile() call made by pGraphBuilder but I can not find a QAxWidget call that uses the RenderFile functionality.

  10. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: DirectShow Video Player Inside Qt

    Quote Originally Posted by Rayven
    Jacek, the code you gave me does work, but I think there is something else I am missing. The video plays now, but it does not play within the Qt structure but outside in a new window.
    Unfortunately I can't help you much, as I have no access to ActiveQt.

    IMO setControl() should take care of everything, unless that window doesn't come from FilterGraph but some of its sub-objects.

  11. #10
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Talking [SOLVED] Re: DirectShow Video Player Inside Qt

    I finally got the video player to work! It took a while but I thought I would post the code so if other people want to use Qt to make a Windows video player with frame stepping capabilities they could see what I have done.

    These are the pointers in my .h file.
    Qt Code:
    1. // DirectShow interfaces
    2. IGraphBuilder *pGraphBuilder;
    3. IMediaControl *pMediaControl;
    4. IMediaEventEx *pMediaEvent;
    5. IVideoWindow *pVideoWindow;
    6. IBasicAudio *pBasicAudio;
    7. IBasicVideo *pBasicVideo;
    8. IMediaSeeking *pMediaSeeking;
    9. IMediaPosition *pMediaPosition;
    10. IVideoFrameStep *pFrameStep;
    11. IBaseFilter *pBaseFilter;
    12. IVMRWindowlessControl* pWindowlessControl;
    To copy to clipboard, switch view to plain text mode 

    The openFile function:
    Qt Code:
    1. void VideoViewerWindow::openFile( )
    2. {
    3. QString fileFilter = "Video files (*.mpg *.avi *.mpeg);;All files (*.*)";
    4. QString fileName = QFileDialog::getOpenFileName( this, "Select video file to view",
    5. mDirectoryStr, fileFilter );
    6. if ( fileName.isEmpty( ) == false )
    7. {
    8. QFileInfo info( fileName );
    9. mDirectoryStr = info.absolutePath( );
    10. emit updateFilename( fileName );
    11.  
    12. if( !createVideo( fileName ) )
    13. {
    14. //ERROR CREATING VIDEO
    15. QMessageBox::warning( this, "Video Creation Error",
    16. "There was an error loading the video" );
    17. }
    18. }
    19. }
    To copy to clipboard, switch view to plain text mode 

    The createVideo function:
    Qt Code:
    1. bool VideoViewerWindow::createVideo( QString filename )
    2. {
    3. HRESULT hr;
    4.  
    5. int length = filename.size( ) + 1;
    6. WCHAR* wfile = new WCHAR[length];
    7. int i = 0;
    8. for( i = 0 ; i < filename.size( ) ; i++ )
    9. {
    10. wfile[i] = filename[i].toAscii( );
    11. }
    12. wfile[i] = '\0';
    13.  
    14. hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
    15. if( FAILED( hr ) )
    16. {
    17. return false;
    18. }
    19.  
    20. hr = CoCreateInstance( CLSID_FilterGraph, NULL, CLSCTX_INPROC,
    21. IID_IGraphBuilder, (void **) &pGraphBuilder );
    22. if( FAILED( hr ) )
    23. {
    24. return false;
    25. }
    26.  
    27. hr = pGraphBuilder->QueryInterface( IID_IMediaControl, (void**) &pMediaControl );
    28. if( FAILED( hr ) )
    29. {
    30. return false;
    31. }
    32.  
    33. hr = pGraphBuilder->QueryInterface( IID_IMediaEvent, (void **) &pMediaEvent);
    34. if( FAILED( hr ) )
    35. {
    36. return false;
    37. }
    38.  
    39. hr = pGraphBuilder->QueryInterface( IID_IMediaSeeking, (void **) &pMediaSeeking );
    40. if( FAILED( hr ) )
    41. {
    42. return false;
    43. }
    44.  
    45. hr = pGraphBuilder->QueryInterface( IID_IMediaPosition, (void **) &pMediaPosition);
    46. if( FAILED( hr ) )
    47. {
    48. return false;
    49. }
    50.  
    51. hr = pGraphBuilder->QueryInterface( IID_IVideoWindow, (void **) &pVideoWindow );
    52. if( FAILED( hr ) )
    53. {
    54. return false;
    55. }
    56.  
    57. if( pVideoWindow )
    58. {
    59. pVideoWindow->put_Owner( (OAHWND) mpVideoPlayer->winId( ) );
    60. pVideoWindow->put_WindowStyle( WS_CHILD | WS_CLIPCHILDREN );
    61. }
    62.  
    63. hr = InitWindowlessVMR( (HWND) mpVideoPlayer->winId( ), pGraphBuilder, &pWindowlessControl );
    64. if( SUCCEEDED( hr ) )
    65. {
    66. // Build the graph. For example:
    67. pGraphBuilder->RenderFile( wfile, NULL );
    68. }
    69. // Find the native video size.
    70. long lWidth, lHeight;
    71. hr = pWindowlessControl->GetNativeVideoSize( &lWidth, &lHeight, NULL, NULL );
    72. if ( SUCCEEDED( hr ) )
    73. {
    74. RECT rcSrc, rcDest;
    75. // Set the source rectangle.
    76. SetRect( &rcSrc, 0, 0, lWidth, lHeight );
    77.  
    78. // Get the window client area.
    79. GetClientRect( (HWND) mpVideoPlayer->winId( ), &rcDest );
    80. // Set the destination rectangle.
    81. SetRect(&rcDest, 1, 1, 558, 349);
    82.  
    83. // Set the video position.
    84. hr = pWindowlessControl->SetVideoPosition( &rcSrc, &rcDest );
    85.  
    86. // Add this code to make the video initially show up once opening the file
    87. PAINTSTRUCT ps;
    88. HDC hdc;
    89. RECT rcClient;
    90. GetClientRect( (HWND) mpVideoPlayer->winId( ), &rcClient );
    91. hdc = BeginPaint( (HWND) mpVideoPlayer->winId( ), &ps );
    92. if( pWindowlessControl != NULL )
    93. {
    94. // Find the region where the application can paint by subtracting
    95. // the video destination rectangle from the client area.
    96. // (Assume that g_rcDest was calculated previously.)
    97. HRGN rgnClient = CreateRectRgnIndirect( &rcClient );
    98. HRGN rgnVideo = CreateRectRgnIndirect( &rcDest );
    99. CombineRgn( rgnClient, rgnClient, rgnVideo, RGN_DIFF );
    100.  
    101. // Paint on window.
    102. HBRUSH hbr = GetSysColorBrush( COLOR_BTNFACE );
    103. FillRgn( hdc, rgnClient, hbr );
    104.  
    105. // Clean up.
    106. DeleteObject( hbr );
    107. DeleteObject( rgnClient );
    108. DeleteObject( rgnVideo );
    109.  
    110. // Request the VMR to paint the video.
    111. HRESULT hr = pWindowlessControl->RepaintVideo( (HWND) mpVideoPlayer->winId( ), hdc );
    112. }
    113. }
    114.  
    115. getFrameStepInterface( );
    116. pMediaControl->Run( );
    117.  
    118. return true;
    119. }
    To copy to clipboard, switch view to plain text mode 

    The initWindowlessVMR function:
    Qt Code:
    1. // Initializes the video window for windowless viewing so it will appear inside
    2. // our Qt GUI instead of its own separate window.
    3. HRESULT InitWindowlessVMR(
    4. HWND hwndApp, // Window to hold the video.
    5. IGraphBuilder* pGraph, // Pointer to the Filter Graph Manager.
    6. IVMRWindowlessControl** ppWc // Receives a pointer to the VMR.
    7. )
    8. {
    9. if (!pGraph || !ppWc) return E_POINTER;
    10. IBaseFilter* pVmr = NULL;
    11. IVMRWindowlessControl* pWc = NULL;
    12. // Create the VMR.
    13. HRESULT hr = CoCreateInstance(CLSID_VideoMixingRenderer, NULL,
    14. CLSCTX_INPROC, IID_IBaseFilter, (void**)&pVmr);
    15. if (FAILED(hr))
    16. {
    17. return hr;
    18. }
    19.  
    20. // Add the VMR to the filter graph.
    21. hr = pGraph->AddFilter(pVmr, L"Video Mixing Renderer");
    22. if (FAILED(hr))
    23. {
    24. pVmr->Release();
    25. return hr;
    26. }
    27. // Set the rendering mode.
    28. IVMRFilterConfig* pConfig;
    29. hr = pVmr->QueryInterface(IID_IVMRFilterConfig, (void**)&pConfig);
    30. if (SUCCEEDED(hr))
    31. {
    32. hr = pConfig->SetRenderingMode(VMRMode_Windowless);
    33. pConfig->Release();
    34. }
    35. if (SUCCEEDED(hr))
    36. {
    37. // Set the window.
    38. hr = pVmr->QueryInterface(IID_IVMRWindowlessControl, (void**)&pWc);
    39. if( SUCCEEDED(hr))
    40. {
    41. hr = pWc->SetVideoClippingWindow(hwndApp);
    42. if (SUCCEEDED(hr))
    43. {
    44. *ppWc = pWc; // Return this as an AddRef'd pointer.
    45. }
    46. else
    47. {
    48. // An error occurred, so release the interface.
    49. pWc->Release();
    50. }
    51. }
    52. }
    53. pVmr->Release();
    54. return hr;
    55. }
    To copy to clipboard, switch view to plain text mode 

    And the getFrameStepInterface function:
    Qt Code:
    1. //
    2. // Some video renderers support stepping media frame by frame with the
    3. // IVideoFrameStep interface. See the interface documentation for more
    4. // details on frame stepping.
    5. //
    6. bool VideoViewerWindow::getFrameStepInterface( )
    7. {
    8. HRESULT hr;
    9. IVideoFrameStep *pFrameStepTest = NULL;
    10.  
    11. // Get the frame step interface, if supported
    12. hr = pGraphBuilder->QueryInterface( __uuidof(IVideoFrameStep),
    13. (void **) &pFrameStepTest );
    14. if ( FAILED( hr ) )
    15. return false;
    16.  
    17. // Check if this decoder can step
    18. hr = pFrameStepTest->CanStep( 0L, NULL );
    19.  
    20. if ( hr == S_OK )
    21. {
    22. pFrameStep = pFrameStepTest; // Save interface to global variable for later use
    23. return true;
    24. }
    25. else
    26. {
    27. pFrameStepTest->Release( );
    28. return false;
    29. }
    30. }
    To copy to clipboard, switch view to plain text mode 

    I hope this code helps other people trying to do the same things we have done. This video plays in the Qt GUI inside our frame. We were having problems with it playing in a separate window but realized there is a windowless mode that displays the video in the window you specify instead of its own window. This hasn't made me a DirectShow guru by any means, but at least we got this. Thanks again for all your help!!!

  12. The following 5 users say thank you to ToddAtWSU for this useful post:

    gfunk (24th August 2006), jacek (24th April 2006), KMAPSRULE (25th July 2006), Lemming (23rd December 2006), TheGrimace (6th June 2007)

  13. #11
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: [SOLVED] DirectShow Video Player Inside Qt

    Hi Todd,
    I am trying to do this same thing but I don't manage to make it work. I tried using your code but there is a thing I don't understand: Is VideoViewerWindow a class derived from QAxWidget or something at a higher level? Then what is mpVideoPlayer? I thought that it was a QAxWidget too. Is there any chance that you could post the whole class code or send it to me?

    Thanks

  14. #12
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: [SOLVED] DirectShow Video Player Inside Qt

    I made some progress. I implemented VideoViewerWindow as a QFrame and mpVideoPlayer is a QAxWidget that is a member of VideoViewerWindow. With this I am able to play a movie and hear the sound, but I can't see the image. Probably I am trying to mix the two approaches here (the one using QAxWidget that got the video playing in a separate window and the later one, that I think didn't even use Active Qt). Please shed a litle bit of light since I don't know much about COM programming.

  15. #13
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: [SOLVED] DirectShow Video Player Inside Qt

    I don't know much about COM programming either. A lot of my questions I got answered from looking online and asking questions in Microsoft's DirectShow message boards. I wish I could provide all the code but I do not have permission to give out the code. I believe VideoViewerWindow is a class derived from a QMainWindow and mpVideoPlayer is a QAxWidget that is a member of the VideoViewerWindow class. I have not looked at the code since about December so I am a bit foggy about it but based on how I do all my naming convention a class ending in the word Window is a QMainWindow subclass. Hopefully this will help you out and if you need more help I can try to get back to the code and look through it. But my initial guess would be since you can hear the sound is that you have initialized it correctly but need to issue redraws in your code. Here is a link to a good Microsoft DirectShow forum that could also help you. http://msdn.microsoft.com/newsgroups...&lang=en&cr=US I posted some questions on here so maybe you can search or post some things here too. I will try to remember to check this forum page again, but if I don't respond please send me another PM as I get an e-mail when I receive a PM where I don't get any e-mails when someone responds to this message. Good luck on your project.

  16. The following user says thank you to ToddAtWSU for this useful post:

    trskel (12th June 2007)

  17. #14
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: [SOLVED] DirectShow Video Player Inside Qt

    Thanks a lot.
    I will look into the redraw issue and look in that forum. I will ask you again if I cannot get it to work.

  18. #15
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: [SOLVED] DirectShow Video Player Inside Qt

    Sounds good and I will try to look at that code again, too.

  19. #16
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: [SOLVED] DirectShow Video Player Inside Qt

    Still no luck. I have been trying different things but I still cannot see the video play in the window.
    I can make it work with no problems if it displays in its own external window, but whenever use the InitWindowlessVMR() finction, I don't see anything (only sound), and my application window looks exactly like when the video is displayed in window mode.

    Do you use mpVideoPlayer->setControl( QUuid( CLSID_FilterGraph ) ); at any point?

    If you don't have more suggestions I will post my code here.

  20. #17
    Join Date
    Nov 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: [SOLVED] DirectShow Video Player Inside Qt

    i am a new in directshow, i use mfc create a player, but the user interface is very ugly and i don't like mfc, so i want to use qt make a user interface, i hope you can help me. thank you

    i include dshow.h in my header, but a few variable don't use and tips not find

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.