[vlc-devel] Getting the size of a video
yann LE HIR
yann.lehir at gmail.com
Wed Nov 30 14:58:52 CET 2011
On Thu, Nov 3, 2011 at 04:07:01PM +0100, Frederic YHUEL wrote:
>On Wed, Nov 2, 2011 at 8:55 PM, Laurent Aimar <fenrir at elivagar.org> wrote:
>> On Wed, Nov 02, 2011 at 04:59:35PM +0100, Frederic YHUEL wrote:
>>> libvlc_video_get_size( ) function has been disabled by this commit:
>> What I wonder is which size should libvlc_video_get_size() returns:
>> - the size of the decoded video
>> - the size of the video window
>> If it is the first, using libvlc_media_get_tracks_info() should allow
>> to get it.
>Laurent, thanks a lot!
>Indeed I need the size of the decoded video :-)
libvlc_media_get_tracks_info() works fine on files but sometimes gives
bad data with streams (TS streams with mpeg2 video in that case).
However, X11 video_output module get the good size when creating the window.
My software embed a vlc_media_player in a GTK Window (with
set_xwindow()). And I would like to resize the widget that displays
VLC when I load a file.
The video_output module used in that case is xvideo, that
automatically resize the vlc window to the size of the xwindow given
and replace the size values in the config of the video output thread.
I managed to make it work, but I had to modify the way the xvideo
module works, and to hack around in libvlc_video_get_size() to access
the private part of video output thread.
This solution is less than satisfying, i'll join a patch to show you
how I did it.
So my question is, is there a better way to do this ?
Yann LE HIR
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2348 bytes
Desc: not available
More information about the vlc-devel