[vlc-devel] libvlc_video_resize

ChengYQ crashboat at hotmail.com
Sat Aug 25 14:28:23 CEST 2007


Hi,
 
Thanks a lot for your reply:) I am sorry I commented the lit out, I am not sure whether it should be placed before playing or after playing, so I tried in two place, none of them worked; 
    item = libvlc_playlist_add (inst, filename, NULL, &excp); 
    quit_on_exception (&excp);
    //libvlc_input_t * lit = libvlc_playlist_get_input(inst, &excp); // doesn't work here 
   libvlc_playlist_play (inst, item, 0, NULL, &excp);     Sleep(2000);
    libvlc_input_t * lit = libvlc_playlist_get_input(inst, &excp);  //  doesn't work here neither    int w = libvlc_video_get_width(lit,&excp);//w is always 0.
    libvlc_video_resize(lit,100,100,&excp);   //MFC program exit when adding this line.
I've tried to use 0.9.0, but when I compile it, the library loading failed.
I use the same way as I did for 0.8.6c, and copy all plugins and the libvlc.dll in my workspace.
I attached the headfile and the test code, could you please help me to have a look? 
 
Thanks a lot and good luck:)
 
Yours
Jay
 
 
Message: 2Date: Fri, 24 Aug 2007 15:42:02 +0200From: Pierre d'Herbemont <pdherbemont at free.fr>Subject: Re: [vlc-devel] libvlc_video_resizeTo: Mailing list for VLC media player developers	<vlc-devel at videolan.org>Message-ID: <A58CFEF5-550C-43C2-9A7F-4272B23EE89A at free.fr>Content-Type: text/plain; charset="utf-8" Hi, LibVLC is under some big changes. Basically libvlc_media_instance_t  has replaced libvlc_input_t. If you are using 0.9.0 I suggest you to look at: http://wiki.videolan.org/LibVLC_Tutorial Which shows how to use a media_instance (the playlist functions may  become deprecated). You can then, pass the media_instance_t to  libvlc_video_resize() or whatever. In the sample code you showed I don't see any definition of 'lit',  which you be the result of libvlc_playlist_get_media_instance(). Good Luck, Pierre. On 23 ao?t 07, at 22:40, ChengYQ wrote: > Hi,>> Basically, I want to realize the video zoom function in my  > application using vlclib.>> However the libvlc_video_resize function does not work, and exit  > when I use this function(libary loading is OK), and when I try to  > use libvlc_video_get_width, the result is always 0.>> One more query is that the libvlc.h has many type: libvlc_input_t  > as input parameters, i.e. libvlc_video_resize function. But when I  > check the Doxygen websites, the inpurt parameter is  > libvlc_media_instance. why this two function is different? are both  > difinition for libvlc?>> here is my testing code, please give me some help, thanks a lot!>>    libvlc_exception_t excp;>    libvlc_instance_t *inst;>    int item;>    char *myarg0 = "-I";  char *myarg1 = "dummy";>    char *myarg2 = "--plugin-path=D:test\\plugins";>    char *myargs[4] = {myarg0, myarg1, myarg2, NULL};>    char *filename = "d:\\MOV02225.MPG";>    libvlc_exception_init (&excp);>    inst = libvlc_new (3, myargs, &excp);>    quit_on_exception (&excp);>    item = libvlc_playlist_add (inst, filename, NULL, &excp);>    quit_on_exception (&excp);>>    libvlc_playlist_play (inst, item, 0, NULL, &excp);>    Sleep(2000);>    int w = libvlc_video_get_width(lit,&excp);//w is always 0.>    libvlc_video_resize(lit,100,100,&excp);>    Sleep (3000);>    libvlc_destroy (inst);>    return 0;>>
_________________________________________________________________
通过 Windows Live Spaces 与朋友轻松共享您的生活。
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=zh-cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070825/d3e2f8a8/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myvlc.h
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070825/d3e2f8a8/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testvlcconsole.cpp
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070825/d3e2f8a8/attachment.ksh>


More information about the vlc-devel mailing list