mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
Merge remote-tracking branch 'origin/0.10'
Conflicts: gst/gst.c plugins/elements/gstqueue2.c
This commit is contained in:
commit
393c758a1c
3 changed files with 20 additions and 1 deletions
|
@ -730,6 +730,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
|
||||||
g_type_class_ref (gst_segment_flags_get_type ());
|
g_type_class_ref (gst_segment_flags_get_type ());
|
||||||
g_type_class_ref (gst_scheduling_flags_get_type ());
|
g_type_class_ref (gst_scheduling_flags_get_type ());
|
||||||
g_type_class_ref (gst_meta_flags_get_type ());
|
g_type_class_ref (gst_meta_flags_get_type ());
|
||||||
|
g_type_class_ref (gst_toc_entry_type_get_type ());
|
||||||
|
|
||||||
g_type_class_ref (gst_control_binding_get_type ());
|
g_type_class_ref (gst_control_binding_get_type ());
|
||||||
g_type_class_ref (gst_control_source_get_type ());
|
g_type_class_ref (gst_control_source_get_type ());
|
||||||
|
@ -740,6 +741,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
|
||||||
_priv_gst_buffer_list_initialize ();
|
_priv_gst_buffer_list_initialize ();
|
||||||
_priv_gst_sample_initialize ();
|
_priv_gst_sample_initialize ();
|
||||||
_priv_gst_value_initialize ();
|
_priv_gst_value_initialize ();
|
||||||
|
|
||||||
g_type_class_ref (gst_param_spec_fraction_get_type ());
|
g_type_class_ref (gst_param_spec_fraction_get_type ());
|
||||||
_priv_gst_tag_initialize ();
|
_priv_gst_tag_initialize ();
|
||||||
_priv_gst_toc_initialize ();
|
_priv_gst_toc_initialize ();
|
||||||
|
@ -1098,6 +1100,7 @@ gst_deinit (void)
|
||||||
|
|
||||||
g_type_class_unref (g_type_class_peek (gst_control_binding_get_type ()));
|
g_type_class_unref (g_type_class_peek (gst_control_binding_get_type ()));
|
||||||
g_type_class_unref (g_type_class_peek (gst_control_source_get_type ()));
|
g_type_class_unref (g_type_class_peek (gst_control_source_get_type ()));
|
||||||
|
g_type_class_unref (g_type_class_peek (gst_toc_entry_type_get_type ()));
|
||||||
|
|
||||||
gst_deinitialized = TRUE;
|
gst_deinitialized = TRUE;
|
||||||
GST_INFO ("deinitialized GStreamer");
|
GST_INFO ("deinitialized GStreamer");
|
||||||
|
|
|
@ -661,7 +661,7 @@ apply_segment (GstQueue2 * queue, GstEvent * event, GstSegment * segment,
|
||||||
gst_event_copy_segment (event, segment);
|
gst_event_copy_segment (event, segment);
|
||||||
|
|
||||||
if (segment->format == GST_FORMAT_BYTES) {
|
if (segment->format == GST_FORMAT_BYTES) {
|
||||||
if (QUEUE_IS_USING_TEMP_FILE (queue)) {
|
if (!QUEUE_IS_USING_QUEUE (queue)) {
|
||||||
/* start is where we'll be getting from and as such writing next */
|
/* start is where we'll be getting from and as such writing next */
|
||||||
queue->current = add_range (queue, segment->start);
|
queue->current = add_range (queue, segment->start);
|
||||||
/* update the stats for this range */
|
/* update the stats for this range */
|
||||||
|
@ -1005,6 +1005,8 @@ perform_seek_to_offset (GstQueue2 * queue, guint64 offset)
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
|
/* until we receive the FLUSH_STOP from this seek, we skip data */
|
||||||
|
queue->seeking = TRUE;
|
||||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (queue, "Seeking to %" G_GUINT64_FORMAT, offset);
|
GST_DEBUG_OBJECT (queue, "Seeking to %" G_GUINT64_FORMAT, offset);
|
||||||
|
@ -2138,6 +2140,7 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||||
queue->sinkresult = GST_FLOW_OK;
|
queue->sinkresult = GST_FLOW_OK;
|
||||||
queue->is_eos = FALSE;
|
queue->is_eos = FALSE;
|
||||||
queue->unexpected = FALSE;
|
queue->unexpected = FALSE;
|
||||||
|
queue->seeking = FALSE;
|
||||||
/* reset rate counters */
|
/* reset rate counters */
|
||||||
reset_rate_timer (queue);
|
reset_rate_timer (queue);
|
||||||
gst_pad_start_task (queue->srcpad, (GstTaskFunction) gst_queue2_loop,
|
gst_pad_start_task (queue->srcpad, (GstTaskFunction) gst_queue2_loop,
|
||||||
|
@ -2283,6 +2286,10 @@ gst_queue2_chain_buffer_or_buffer_list (GstQueue2 * queue,
|
||||||
if (queue->unexpected)
|
if (queue->unexpected)
|
||||||
goto out_unexpected;
|
goto out_unexpected;
|
||||||
|
|
||||||
|
/* while we didn't receive the newsegment, we're seeking and we skip data */
|
||||||
|
if (queue->seeking)
|
||||||
|
goto out_seeking;
|
||||||
|
|
||||||
if (!gst_queue2_wait_free_space (queue))
|
if (!gst_queue2_wait_free_space (queue))
|
||||||
goto out_flushing;
|
goto out_flushing;
|
||||||
|
|
||||||
|
@ -2312,6 +2319,14 @@ out_eos:
|
||||||
|
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
|
out_seeking:
|
||||||
|
{
|
||||||
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are seeking");
|
||||||
|
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||||
|
gst_mini_object_unref (item);
|
||||||
|
|
||||||
|
return GST_FLOW_OK;
|
||||||
|
}
|
||||||
out_unexpected:
|
out_unexpected:
|
||||||
{
|
{
|
||||||
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we received EOS");
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we received EOS");
|
||||||
|
|
|
@ -143,6 +143,7 @@ struct _GstQueue2
|
||||||
* because we can't save it on the file */
|
* because we can't save it on the file */
|
||||||
gboolean segment_event_received;
|
gboolean segment_event_received;
|
||||||
GstEvent *starting_segment;
|
GstEvent *starting_segment;
|
||||||
|
gboolean seeking;
|
||||||
|
|
||||||
GstEvent *stream_start_event;
|
GstEvent *stream_start_event;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue