eo_event_callback_call(ev->obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL);
}
-/* Returns true if libvlc mediaplayer is ready to process commands. */
-static Eina_Bool
-libvlc_mp_is_ready(Emotion_LibVLC *ev)
-{
- libvlc_state_t state;
-
- if (!ev->mp) return EINA_FALSE;
- state = libvlc_media_player_get_state(ev->mp);
- return state == libvlc_Playing || state == libvlc_Paused;
-}
-
/* Fetch all libvlc tracks. */
static int
libvlc_fetch_tracks(Emotion_LibVLC *ev)
*width = 0;
*height = 0;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
track = libvlc_get_current_video_track(ev);
if (track)
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0.0;
+ if (!ev->started) return 0.0;
return ev->pos;
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev))
+ if (!ev->started)
{
_emotion_seek_done(ev->obj);
return;
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0.0;
+ if (!ev->started) return 0.0;
return ev->len;
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0.0;
+ if (!ev->started) return 0.0;
return ev->buffer_cache;
}
{
libvlc_media_track_t *track;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
track = libvlc_get_current_video_track(ev);
if (track)
Emotion_LibVLC *ev = video;
libvlc_media_track_t *track;
- if (!libvlc_mp_is_ready(ev)) return 0.0;
+ if (!ev->started) return 0.0;
track = libvlc_get_current_video_track(ev);
if (track)
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0.0;
+ if (!ev->started) return 0.0;
return libvlc_video_get_track_count(ev->mp) > 0;
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0.0;
+ if (!ev->started) return 0.0;
return libvlc_audio_get_track_count(ev->mp) > 0;
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0;
+ if (!ev->started) return 0;
return libvlc_media_player_is_seekable(ev->mp);
}
Emotion_LibVLC *ev = video;
unsigned int navigate;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
switch (event)
{
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return -1;
+ if (!ev->started) return -1;
return libvlc_video_get_track_count(ev->mp);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
if (channel < 0)
libvlc_video_set_track(ev->mp, -1);
Emotion_LibVLC *ev = video;
int id;
- if (!libvlc_mp_is_ready(ev)) return -1;
+ if (!ev->started) return -1;
id = libvlc_video_get_track(ev->mp);
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
free(ev->subtitle_file);
ev->subtitle_file = filepath ? strdup(filepath) : NULL;
Emotion_LibVLC *ev = video;
libvlc_media_track_t *track;
- if (!libvlc_mp_is_ready(ev)) return NULL;
+ if (!ev->started) return NULL;
track = libvlc_get_track_at_pos(ev, channel, libvlc_track_video);
if (track)
return;
ev->video_mute = mute;
- if (libvlc_mp_is_ready(ev))
+ if (ev->started)
em_video_channel_set(video, mute ? -1 : 0);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return -1;
+ if (!ev->started) return -1;
return em_channel_count(libvlc_audio_get_track_count(ev->mp));
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
if (channel < 0)
libvlc_audio_set_track(ev->mp, -1);
Emotion_LibVLC *ev = video;
int id;
- if (!libvlc_mp_is_ready(ev)) return -1;
+ if (!ev->started) return -1;
id = libvlc_audio_get_track(ev->mp);
Emotion_LibVLC *ev = video;
libvlc_media_track_t *track;
- if (!libvlc_mp_is_ready(ev)) return NULL;
+ if (!ev->started) return NULL;
track = libvlc_get_track_at_pos(ev, channel, libvlc_track_audio);
if (track)
ev->audio_mute = mute;
- if (libvlc_mp_is_ready(ev))
+ if (ev->started)
em_audio_channel_set(video, mute ? -1 : 0);
}
vol = 1.0;
ev->audio_vol = vol * 100;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
libvlc_audio_set_volume(ev->mp, ev->audio_vol);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev))
+ if (!ev->started)
return ev->audio_vol / 100.0;
return libvlc_audio_get_volume(ev->mp) / 100.0;
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return -1;
+ if (!ev->started) return -1;
return em_channel_count(libvlc_video_get_spu_count(ev->mp));
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
if (channel < 0)
libvlc_video_set_spu(ev->mp, -1);
Emotion_LibVLC *ev = video;
int id;
- if (!libvlc_mp_is_ready(ev)) return -1;
+ if (!ev->started) return -1;
id = libvlc_video_get_spu(ev->mp);
Emotion_LibVLC *ev = video;
libvlc_media_track_t *track;
- if (!libvlc_mp_is_ready(ev)) return NULL;
+ if (!ev->started) return NULL;
track = libvlc_get_track_at_pos(ev, channel, libvlc_track_text);
if (track)
ev->spu_mute = mute;
- if (libvlc_mp_is_ready(ev))
+ if (ev->started)
em_spu_channel_set(video, mute ? -1 : 0);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0;
+ if (!ev->started) return 0;
return libvlc_media_player_get_chapter_count(ev->mp);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
libvlc_media_player_set_chapter(ev->mp, chapter);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 0;
+ if (!ev->started) return 0;
return libvlc_media_player_get_chapter(ev->mp);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return NULL;
+ if (!ev->started) return NULL;
if (ev->nb_chapters == 0)
{
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return;
+ if (!ev->started) return;
libvlc_media_player_set_rate(ev->mp, speed);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return 1.0;
+ if (!ev->started) return 1.0;
return libvlc_media_player_get_rate(ev->mp);
}
{
Emotion_LibVLC *ev = video;
- if (!libvlc_mp_is_ready(ev)) return NULL;
+ if (!ev->started) return NULL;
if (meta <= 0 || meta >= META_TRACK_COUNT)
return NULL;