Example #1
0
bool media_replay()
{
	if(mediaplay != NULL)
	{
		libvlc_media_player_stop(mediaplay);	
		return media_play();
	}
	return false;
}
Example #2
0
bool media_url_play(const char *url,int * panel)
{
	
	hwnd_handle = panel;
	
	media_inst = libvlc_new(0,NULL);
	
	media_handle = libvlc_media_new_location(media_inst,url);
	mediaplay = libvlc_media_player_new_from_media(media_handle);
	
	
	
		
	return media_play();
}
Example #3
0
bool media_file_play(const char * filename,int * panel)
{
	
	hwnd_handle = panel;
	
	media_inst = libvlc_new(0,NULL);
	
	if(mediaplay != NULL)
	{
		libvlc_media_player_stop(mediaplay);
	}
	
	media_handle = libvlc_media_new_path(media_inst,filename);
	mediaplay = libvlc_media_player_new_from_media(media_handle);
	
		
	return media_play();
}
/*
--------------------------------------------------
void mpPlay(STRING *songName)

Desc:

Returns: -
--------------------------------------------------
*/
void mpPlay(STRING *songName) {
	
	WriteLog("[ ] Now playing: ");
	
	if(media_playing(mpHandle)) media_stop(mpHandle);
	if(mpCount > mpSongs - 1 || mpCount < 0) return;
	
	str_cpy(_mpSongTemp,songName);
	str_trunc(_mpSongTemp, str_len(EXT_MUSIC)-1 ); // because our four chars are: .ogg
	
	WriteLog(_mpSongTemp);
	NewLine();
	
	str_cpy(mpSongTemp,PATH_MUSIC);
	str_cat(mpSongTemp,songName);
	
	str_for_num(_mpCount, mpCount); // strcpy is unnecessary here
	
	mpHandle = media_play(mpSongTemp,NULL,VOL_MUSIC);
	
	while(media_playing(mpHandle)) wait(1);
	mpNext();
	
}