[vlc-devel] new vlc instance error in windows mobile 5

InfoEyes BJ infoeyes2010 at gmail.com
Sat Aug 21 15:54:36 CEST 2010


After some improvement, now the error occurs here:

          /* Create a media player playing environement */
          mp = libvlc_media_player_new_from_media (m);

The program does not continue.

----------------------------------------------------------------------------------------------------------------
The following is my test program.

#include <stdio.h>
#include <stdlib.h>
#include <vlc/vlc.h>
#include <dir.h>
#include <windows.h>

int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine,
int nCmdShow)
{

          int status;
          status = mkdir("/sample/EEv4");


          libvlc_instance_t * inst;
          libvlc_media_player_t *mp;
          libvlc_media_t *m;

          /* Load the VLC engine */
          inst = libvlc_new (0, NULL);

          /* Create a new item */
          m = libvlc_media_new_path (inst, "/sample/EEv3.mp4");

          /* Create a media player playing environement */
          mp = libvlc_media_player_new_from_media (m);

          MessageBoxW(0, L"CREAT ENV SUC!", L"LOG", 0);

            /* No need to keep the media now */
          libvlc_media_release (m);

 #if 0
     /* This is a non working code that show how to hooks into a window,
      * if we have a window around */
      libvlc_media_player_set_xdrawable (mp, xdrawable);
     /* or on windows */
      libvlc_media_player_set_hwnd (mp, hwnd);
     /* or on mac os */
      libvlc_media_player_set_nsobject (mp, view);
  #endif

     /* play the media_player */
     libvlc_media_player_play (mp);

     //sleep(1000); /* Let it play a bit */
     //system("pause");
     int i=1;
     int j=1;
     for (i=1;i<10000000;i++){
         for (j=1;j<100;j++);
     }

     /* Stop playing */
     libvlc_media_player_stop (mp);

     /* Free the media_player */
     libvlc_media_player_release (mp);

          libvlc_release (inst);


          return 0;
}



2010/8/21 InfoEyes BJ <infoeyes2010 at gmail.com>

> HI,
>
> I wrote the libvlc invoking program as
> http://wiki.videolan.org/LibVLC_Tutorial
>
> To embed some "printf"-like debug labels, I find that when the program
> creates a new libvlc instance
>
>           /* Load the VLC engine */
>           inst = libvlc_new (0, NULL);
>
> The program is blocked there. I also find that some DLL are called.
>
> Any help is appreciated!
>
> Thanks,
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100821/0b652360/attachment.html>


More information about the vlc-devel mailing list