Unable to run C program [message #1828089] |
Mon, 01 June 2020 08:14  |
Eclipse User |
|
|
|
Hi All,
My requirement is to play a video file and pause it after 2 secs. Iam new to C program and i decided to code in eclipse as i am familiar with java. i have done all the prerequisites and have no errors in my project. But when i try to run noting happens. No video open.
I am using cygwin compiler and have added the header files nad vlc library in the properties.
Need your help on the below code:
#include <stdio.h>
#include <stdlib.h>
#include <libvlc.h>
#include <vlc.h>
#include <windows.h>
int main()
{
libvlc_instance_t * my_inst;
libvlc_media_player_t *mp;
libvlc_media_t *m;
/* Load the VLC engine */
my_inst = libvlc_new (0, NULL);
/* Create a new item */
m = libvlc_media_new_path (my_inst, "C:\\Movies\\Cap.mp4");
/* Create a media player playing environment */
mp = libvlc_media_player_new_from_media (m);
/* play the media_player */
libvlc_media_player_play (mp);
Sleep(2); /* Let it play a bit */
/* Stop playing */
libvlc_media_player_stop (mp);
/* Free the media_player */
libvlc_media_release (m);
libvlc_media_player_release (mp);
libvlc_release (my_inst);
return 0;
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.03007 seconds