Advertisement
rotrevrep

Untitled

Jan 7th, 2016
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.13 KB | None | 0 0
  1. // matroska-demux.h
  2. ...
  3.  
  4.   /* Cached upstream length (default G_MAXUINT64) */
  5.   guint64              cached_length;
  6.  
  7.   GstTagList              *tag_list;
  8. } GstMatroskaDemux;
  9. ...
  10. // matroska-demux.c
  11. ...
  12. static GstFlowReturn
  13. gst_matroska_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
  14. {
  15.   GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (parent);
  16.   guint available;
  17.   GstFlowReturn ret = GST_FLOW_OK;
  18.   guint needed = 0;
  19.   guint32 id;
  20.   guint64 length;
  21.  
  22.   if (demux->tag_list) {
  23.     gst_matroska_read_common_found_global_tag (&demux->common, GST_ELEMENT_CAST (demux), demux->tag_list);
  24.     gst_matroska_demux_send_tags (demux);
  25.     demux->tag_list = NULL;
  26.   }
  27. ...
  28. static gboolean
  29. gst_matroska_demux_handle_sink_event (GstPad * pad, GstObject * parent,
  30.     GstEvent * event)
  31. {
  32.   gboolean res = TRUE;
  33.   GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (parent);
  34.  
  35.   GST_DEBUG_OBJECT (demux,
  36.       "have event type %s: %p on sink pad", GST_EVENT_TYPE_NAME (event), event);
  37.  
  38.   switch (GST_EVENT_TYPE (event)) {
  39.     case GST_EVENT_TAG:
  40.     {
  41.       gst_event_parse_tag (event, &demux->tag_list);
  42.       break;
  43.     }
  44. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement