Audio streaming. Restore playback position after lose internet connection
ilya.shknaj
ilya.shknaj at gmail.com
Wed May 28 07:18:10 PDT 2014
I try save position and set it after connection restore, but audio begin from
start
void gst_native_set_uri (JNIEnv* env, jobject thiz, jstring uri) {
GST_DEBUG ("Call gst_native_set_uri");
CustomData *data = GET_CUSTOM_DATA (env, thiz, custom_data_field_id);
if (!data || !data->pipeline) return;
const jbyte *char_uri = (*env)->GetStringUTFChars (env, uri, NULL);
GST_DEBUG ("Setting URI to %s", char_uri);
if (data->target_state >= GST_STATE_READY)
gst_element_set_state (data->pipeline, GST_STATE_READY);
g_object_set(data->pipeline, "uri", char_uri, NULL);
(*env)->ReleaseStringUTFChars (env, uri, char_uri);
data->duration = GST_CLOCK_TIME_NONE;
data->is_live = (gst_element_set_state (data->pipeline,
data->target_state) == GST_STATE_CHANGE_NO_PREROLL);
}
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Audio-streaming-Restore-playback-position-after-lose-internet-connection-tp4667244p4667245.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list