[vlc-devel] [VLC] #4319: libvlc_media_player_set_xwindow has some problem(bugs ?) :(

ryanevans osex86 at gmail.com
Thu Nov 11 07:38:17 CET 2010


i got a following comment. 

>> ` The XID cannot be changed while the video is playing. This is not a
bug.`

so, I rebuild it using addWidget(insertWidget) and removeWidget with one
widget. next log for the widget(drawable).

[normal] addWidget id - 0x 88f4e88 (top level = 0 )
[full] removeWidget id - 0x 88f4e88 (top level = 1 ) 

but, output video failed. 
could you explain what i got a mistake ? 

thx.

2010-11-10 (수), 15:28 +0000, VLC:
> #4319: libvlc_media_player_set_xwindow has some problem(bugs ?)  :(
> ----------------------------------------------+-----------------------------
>   Reporter:  ryan                             |        Owner:  courmisch    
>       Type:  defect                           |       Status:  closed       
>   Priority:  normal                           |    Milestone:  Bugs paradize
>  Component:  LibVLC                           |      Version:  master       
>   Severity:  normal                           |   Resolution:  wontfix      
>   Keywords:  libvlc_media_player_set_xwindow  |     Platform:  Linux        
> Difficulty:  unknown                          |          Wip:  Not started  
> ----------------------------------------------+-----------------------------
> Changes (by courmisch):
> 
>   * status:  new => closed
>   * resolution:  => wontfix
> 
> 
> Old description:
> 
> > i'v setting two QWidget(full and normal view) for drawable object.
> >
> > first one is top-level widget(w_fulldraw) for the full-sized.
> > second one is embedded widget(w_drawable) for the normal-sized.
> >
> > this is my code-snippet to toggle full-screen.
> >
> > void Player::toggleFullscreen()
> > {
> >         ...
> >     if( libvlc_get_fullscreen( mp ) ) {
> >         ...
> >         libvlc_media_player_set_xwindow( mp,
> > w_drawing->w_drawable->winId() );
> >         ...
> >         qDebug("[normal] parent/mp/drawable - 0x%8x 0x%8x 0x%8x\n",
> >                     (unsigned int)w_drawing->w_drawable->parentWidget(),
> >                     (unsigned int)libvlc_media_player_get_xwindow(mp),
> >                     (unsigned int)w_drawing->w_drawable->winId() );
> >
> >         libvlc_set_fullscreen(mp,false);
> >     }else {
> >         w_fulldraw = new QFrame();
> >         ...
> >
> >         w_fulldraw->setParent(0);
> >         libvlc_media_player_set_xwindow( mp, w_fulldraw->winId());
> >
> >            qDebug("[full] parent/mp/drawable - 0x%8x 0x%8x 0x%8x\n",
> >                     (unsigned int)w_fulldraw->parentWidget(),
> >                     (unsigned int)libvlc_media_player_get_xwindow(mp),
> >                     (unsigned int)w_fulldraw->winId() );
> >
> >                 libvlc_set_fullscreen(mp,true);
> >                 ...
> >         }
> >         ...
> > }
> >
> > following log is printed by qDebug when i tried to toggle full-screen and
> > normal-screen.
> >
> > [full] parent/mp/drawable - 0x       0 0x 5a006b2 0x 5a006b2
> > [normal] parent/mp/drawable - 0x 9311818 0x 5a00461 0x 5a00461
> >
> > first argument is parent's id (of drawable)
> > second one is confirmed by libvlc_media_player_get(set)_xwindow.
> > third one is drawable widget's id.
> >
> > but this isn't worked.
> > when i tried this(normal to full), it still output video to the normal-
> > sized(w_drawable).
> > and i tried once more, still output video to the normal-sized(w_drawable)
> > failed.
> >
> > what's the problem ?
> > does libvlc_media_player_set_xwindow can changable widget ?
> >   during playing media (after called libvlc_media_player_play.)
> >
> > thx in advance :)
> 
> New description:
> 
>  i'v setting two QWidget(full and normal view) for drawable object.
> 
>  first one is top-level widget(w_fulldraw) for the full-sized.
>  second one is embedded widget(w_drawable) for the normal-sized.
> 
>  this is my code-snippet to toggle full-screen.
> 
>  void Player::toggleFullscreen()
>  {
>          ...
>      if( libvlc_get_fullscreen( mp ) ) {
>          ...
>          libvlc_media_player_set_xwindow( mp,
>  w_drawing->w_drawable->winId() );
>          ...
>          qDebug("[normal] parent/mp/drawable - 0x%8x 0x%8x 0x%8x\n",
>                      (unsigned int)w_drawing->w_drawable->parentWidget(),
>                      (unsigned int)libvlc_media_player_get_xwindow(mp),
>                      (unsigned int)w_drawing->w_drawable->winId() );
> 
>          libvlc_set_fullscreen(mp,false);
>      }else {
>          w_fulldraw = new QFrame();
>          ...
> 
>          w_fulldraw->setParent(0);
>          libvlc_media_player_set_xwindow( mp, w_fulldraw->winId());
> 
>             qDebug("[full] parent/mp/drawable - 0x%8x 0x%8x 0x%8x\n",
>                      (unsigned int)w_fulldraw->parentWidget(),
>                      (unsigned int)libvlc_media_player_get_xwindow(mp),
>                      (unsigned int)w_fulldraw->winId() );
> 
>                  libvlc_set_fullscreen(mp,true);
>                  ...
>          }
>          ...
>  }
> 
>  following log is printed by qDebug when i tried to toggle full-screen and
>  normal-screen.
> 
>  [full] parent/mp/drawable - 0x       0 0x 5a006b2 0x 5a006b2
>  [normal] parent/mp/drawable - 0x 9311818 0x 5a00461 0x 5a00461
> 
>  first argument is parent's id (of drawable)
>  second one is confirmed by libvlc_media_player_get(set)_xwindow.
>  third one is drawable widget's id.
> 
>  but this isn't worked.
>  when i tried this(normal to full), it still output video to the normal-
>  sized(w_drawable).
>  and i tried once more, still output video to the normal-sized(w_drawable)
>  failed.
> 
>  what's the problem ?
>  does libvlc_media_player_set_xwindow can changable widget ?
>    during playing media (after called libvlc_media_player_play.)
> 
>  thx in advance :)
> 
> --
> 
> Comment:
> 
>  The XID cannot be changed while the video is playing. This is not a bug.
> 





More information about the vlc-devel mailing list