-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.cpp
More file actions
32 lines (24 loc) · 684 Bytes
/
source.cpp
File metadata and controls
32 lines (24 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <bits/stdc++.h>
#include <unistd.h>
#include <vlc/vlc.h>
using namespace std;
int main()
{
libvlc_instance_t *insta;
insta = libvlc_new(0,NULL);
if( insta == NULL )
{
cout << "unable to initialize the lib vlc" ;
}
libvlc_media_t *file;
file = libvlc_media_new_path(insta ,"sample_audio.mp3");
libvlc_media_player_t *player;
player = libvlc_media_player_new_from_media(file);
libvlc_media_player_play(player);
sleep(25);
libvlc_media_release(file);
libvlc_media_player_release(player);
libvlc_release(insta);
cout << " program ends" ;
return 0;
}