<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Hi,<BR>
 <BR>
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; <BR>
    item = libvlc_playlist_add (inst, filename, NULL, &excp); <BR>
    quit_on_exception (&excp);<BR>
    <STRONG>//libvlc_input_t * lit = libvlc_playlist_get_input(inst, &excp); // doesn't work here </STRONG><BR>
<STRONG>   </STRONG>libvlc_playlist_play (inst, item, 0, NULL, &excp); <BR>    Sleep(2000);<BR>
    <STRONG>libvlc_input_t * lit = libvlc_playlist_get_input(inst, &excp);  //  doesn't work here neither</STRONG><BR>    int w = libvlc_video_get_width(lit,&excp);//w is always 0.<BR>
    libvlc_video_resize(lit,100,100,&excp);   //MFC program exit when adding this line.<BR><BR>
I've tried to use 0.9.0, but when I compile it, the library loading failed.<BR>
I use the same way as I did for 0.8.6c, and copy all plugins and the libvlc.dll in my workspace.<BR>
I attached the headfile and the test code, could you please help me to have a look? <BR>
 <BR>
Thanks a lot and good luck:)<BR>
 <BR>
Yours<BR>
Jay<BR>
 <BR>
 <BR>
Message: 2<BR>Date: Fri, 24 Aug 2007 15:42:02 +0200<BR>From: Pierre d'Herbemont <pdherbemont@free.fr><BR>Subject: Re: [vlc-devel] libvlc_video_resize<BR>To: Mailing list for VLC media player developers<BR>       <vlc-devel@videolan.org><BR>Message-ID: <A58CFEF5-550C-43C2-9A7F-4272B23EE89A@free.fr><BR>Content-Type: text/plain; charset="utf-8"<BR> <BR>Hi,<BR> <BR>LibVLC is under some big changes. Basically libvlc_media_instance_t  <BR>has replaced libvlc_input_t.<BR> <BR>If you are using 0.9.0 I suggest you to look at:<BR> <BR><A href="http://wiki.videolan.org/LibVLC_Tutorial" target=_blank>http://wiki.videolan.org/LibVLC_Tutorial</A><BR> <BR>Which shows how to use a media_instance (the playlist functions may  <BR>become deprecated). You can then, pass the media_instance_t to  <BR>libvlc_video_resize() or whatever.<BR> <BR>In the sample code you showed I don't see any definition of 'lit',  <BR>which you be the result of libvlc_playlist_get_media_instance().<BR> <BR>Good Luck,<BR> <BR>Pierre.<BR> <BR>On 23 ao?t 07, at 22:40, ChengYQ wrote:<BR> <BR>> Hi,<BR>><BR>> Basically, I want to realize the video zoom function in my  <BR>> application using vlclib.<BR>><BR>> However the libvlc_video_resize function does not work, and exit  <BR>> when I use this function(libary loading is OK), and when I try to  <BR>> use libvlc_video_get_width, the result is always 0.<BR>><BR>> One more query is that the libvlc.h has many type: libvlc_input_t  <BR>> as input parameters, i.e. libvlc_video_resize function. But when I  <BR>> check the Doxygen websites, the inpurt parameter is  <BR>> libvlc_media_instance. why this two function is different? are both  <BR>> difinition for libvlc?<BR>><BR>> here is my testing code, please give me some help, thanks a lot!<BR>><BR>>    libvlc_exception_t excp;<BR>>    libvlc_instance_t *inst;<BR>>    int item;<BR>>    char *myarg0 = "-I";  char *myarg1 = "dummy";<BR>>    char *myarg2 = "--plugin-path=D:test\\plugins";<BR>>    char *myargs[4] = {myarg0, myarg1, myarg2, NULL};<BR>>    char *filename = "d:\\MOV02225.MPG";<BR>>    libvlc_exception_init (&excp);<BR>>    inst = libvlc_new (3, myargs, &excp);<BR>>    quit_on_exception (&excp);<BR>>    item = libvlc_playlist_add (inst, filename, NULL, &excp);<BR>>    quit_on_exception (&excp);<BR>><BR>>    libvlc_playlist_play (inst, item, 0, NULL, &excp);<BR>>    Sleep(2000);<BR>>    int w = libvlc_video_get_width(lit,&excp);//w is always 0.<BR>>    libvlc_video_resize(lit,100,100,&excp);<BR>>    Sleep (3000);<BR>>    libvlc_destroy (inst);<BR>>    return 0;<BR>><BR>><BR><BR><br /><hr />通过 Live.com 查看资讯、娱乐信息和您关心的其他信息! <a href='http://www.live.com/getstarted.aspx ' target='_new'>立即尝试!</a></body>
</html>