Emotion_Audio_Stream *astream;
Emotion_Video_Stream *vstream;
+ fprintf(stderr, "close\n");
ev = (Emotion_Gstreamer_Video *)video;
if (!ev)
return;
Emotion_Gstreamer_Video *ev;
ev = (Emotion_Gstreamer_Video *)video;
+ if (!ev->pipeline) return ;
+
gst_element_set_state(ev->pipeline, GST_STATE_PLAYING);
ev->play = 1;
ev->play_started = 1;
ev = (Emotion_Gstreamer_Video *)video;
+ if (!ev->pipeline) return ;
+
/* shutdown eos */
if (ev->eos_timer)
{
ev = (Emotion_Gstreamer_Video *)video;
+ if (!ev->pipeline) return ;
+
+ if (ev->play)
+ res = gst_element_set_state(ev->pipeline, GST_STATE_PAUSED);
+
res = gst_element_seek(ev->pipeline, 1.0,
GST_FORMAT_TIME,
GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET,
(gint64)(pos * (double)GST_SECOND),
GST_SEEK_TYPE_NONE, -1);
+
+ if (ev->play)
+ res = gst_element_set_state(ev->pipeline, GST_STATE_PLAYING);
}
static double
ev = video;
fmt = GST_FORMAT_TIME;
+
+ if (!ev->pipeline) return 0.0;
+
ret = gst_element_query_duration(ev->pipeline, &fmt, &val);
if (!ret)
goto fallback;
ev = video;
fmt = GST_FORMAT_TIME;
+
+ if (!ev->pipeline) return 0.0;
+
ret = gst_element_query_position(ev->pipeline, &fmt, &val);
if (!ret)
return ev->position;
ev = (Emotion_Gstreamer_Video *)video;
+ if (!ev->pipeline) return ;
+
ev->audio_mute = mute;
g_object_set(G_OBJECT(ev->pipeline), "mute", !!mute, NULL);
ev = (Emotion_Gstreamer_Video *)video;
+ if (!ev->pipeline) return ;
+
if (vol < 0.0)
vol = 0.0;
if (vol > 1.0)