X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Felements%2Fgstqueue2.h;h=e71ec3f067c628ce42fef8154627c57b5886d46f;hb=abeb5e677f756eb940954d0f0c27285ab97cdd23;hp=25beef4044ba7974ebd563c5f152f0a2a2a45826;hpb=05635b374f5bc0645e3a99d3efc864d70c01e98c;p=platform%2Fupstream%2Fgstreamer.git diff --git a/plugins/elements/gstqueue2.h b/plugins/elements/gstqueue2.h index 25beef4..e71ec3f 100644 --- a/plugins/elements/gstqueue2.h +++ b/plugins/elements/gstqueue2.h @@ -18,14 +18,15 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GST_QUEUE2_H__ #define __GST_QUEUE2_H__ #include #include +#include G_BEGIN_DECLS @@ -87,6 +88,9 @@ struct _GstQueue2 GstClockTime sinktime, srctime; /* TRUE if either position needs to be recalculated */ gboolean sink_tainted, src_tainted; + /* Bitrates taken from tags */ + guint sink_tags_bitrate; + guint src_tags_bitrate; /* flowreturn when srcpad is paused */ GstFlowReturn srcresult; @@ -95,24 +99,34 @@ struct _GstQueue2 gboolean unexpected; /* the queue of data we're keeping our hands on */ - GQueue queue; + GstQueueArray *queue; + + GCond query_handled; + gboolean last_query; /* result of last serialized query */ + GstQuery *last_handled_query; GstQueue2Size cur_level; /* currently in the queue */ GstQueue2Size max_level; /* max. amount of data allowed in the queue */ gboolean use_buffering; + gboolean use_tags_bitrate; + gboolean use_bitrate_query; gboolean use_rate_estimate; GstClockTime buffering_interval; - gint low_percent; /* low/high watermarks for buffering */ - gint high_percent; + guint downstream_bitrate; /* the bitrate reported by downstream */ + + /* low/high watermarks for buffering */ + gint low_watermark; + gint high_watermark; /* current buffering state */ gboolean is_buffering; gint buffering_percent; - guint buffering_iteration; + gint last_posted_buffering_percent; /* for measuring input/output rates */ GTimer *in_timer; gboolean in_timer_started; + gdouble last_update_in_rates_elapsed; gdouble last_in_elapsed; guint64 bytes_in; gdouble byte_in_rate; @@ -149,6 +163,15 @@ struct _GstQueue2 guint64 ring_buffer_max_size; guint8 * ring_buffer; + + volatile gint downstream_may_block; + + GstBufferingMode mode; + gint64 buffering_left; + gint avg_in; + gint avg_out; + gboolean percent_changed; + GMutex buffering_post_lock; /* assures only one posted at a time */ }; struct _GstQueue2Class @@ -156,7 +179,7 @@ struct _GstQueue2Class GstElementClass parent_class; }; -GType gst_queue2_get_type (void); +G_GNUC_INTERNAL GType gst_queue2_get_type (void); G_END_DECLS