Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Unable to run C program(Playing a VLC file using C program in kepler)
Unable to run C program [message #1828089] Mon, 01 June 2020 08:14 Go to next message
Eclipse UserFriend
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;
}
Re: Unable to run C program [message #1828109 is a reply to message #1828089] Tue, 02 June 2020 00:36 Go to previous message
Eclipse UserFriend
This forum is for CDT users to ask questions about CDT issues.
It's not meant for programming questions.

You will likely be more successful asking at the videolan support site:
https://www.videolan.org/support/
https://wiki.videolan.org/VSG:Main/
Previous Topic:Problem with Stack pointer in CPP vs. ASM
Next Topic:NO "select other" in my debug configurations
Goto Forum:
  


Current Time: Thu Jun 12 18:26:35 EDT 2025

Powered by FUDForum. Page generated in 0.03007 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top