Commit e10b075e authored by David Schleef's avatar David Schleef
Browse files

ext/ogg/: Add/remove KW-DIRAC header here, since it is ogg-specific.

Original commit message from CVS:
* ext/ogg/gstoggdemux.c:
* ext/ogg/gstoggmux.c:
Add/remove KW-DIRAC header here, since it is ogg-specific.
parent 977b68d7
2006-11-03 David Schleef <ds@schleef.org>
* ext/ogg/gstoggdemux.c:
* ext/ogg/gstoggmux.c:
Add/remove KW-DIRAC header here, since it is ogg-specific.
2006-11-03 Michael Smith <msmith@fluendo.com> 2006-11-03 Michael Smith <msmith@fluendo.com>
   
* gst/typefind/gsttypefindfunctions.c: (mpeg4_video_type_find): * gst/typefind/gsttypefindfunctions.c: (mpeg4_video_type_find):
...@@ -1092,6 +1092,10 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet) ...@@ -1092,6 +1092,10 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet)
} }
} }
if (granule != -1 && memcmp (packet->packet, "KW-DIRAC", 8) == 0) {
return GST_FLOW_OK;
}
/* no start time known, stream to internal plugin to /* no start time known, stream to internal plugin to
* get time. always stream to the skeleton decoder */ * get time. always stream to the skeleton decoder */
if (pad->start_time == GST_CLOCK_TIME_NONE || pad->is_skeleton) { if (pad->start_time == GST_CLOCK_TIME_NONE || pad->is_skeleton) {
......
...@@ -886,6 +886,21 @@ gst_ogg_mux_get_headers (GstOggPad * pad) ...@@ -886,6 +886,21 @@ gst_ogg_mux_get_headers (GstOggPad * pad)
const GValue *streamheader; const GValue *streamheader;
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
if (strcmp (gst_structure_get_name (structure), "video/x-dirac") == 0) {
GstBuffer *buf = gst_buffer_new_and_alloc (16);
int fps_n = 12;
int fps_d = 1;
gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d);
memcpy (GST_BUFFER_DATA (buf), "KW-DIRAC", 8);
GST_WRITE_UINT32_BE (GST_BUFFER_DATA (buf) + 8, fps_n);
GST_WRITE_UINT32_BE (GST_BUFFER_DATA (buf) + 12, fps_d);
res = g_list_append (res, buf);
//res = g_list_append (res, gst_buffer_ref(pad->buffer));
} else {
streamheader = gst_structure_get_value (structure, "streamheader"); streamheader = gst_structure_get_value (structure, "streamheader");
if (streamheader != NULL) { if (streamheader != NULL) {
GST_LOG_OBJECT (thepad, "got header"); GST_LOG_OBJECT (thepad, "got header");
...@@ -912,7 +927,8 @@ gst_ogg_mux_get_headers (GstOggPad * pad) ...@@ -912,7 +927,8 @@ gst_ogg_mux_get_headers (GstOggPad * pad)
GST_LOG_OBJECT (thepad, "streamheader is not fixed list"); GST_LOG_OBJECT (thepad, "streamheader is not fixed list");
} }
} else { } else {
GST_LOG_OBJECT (thepad, "caps done have streamheader"); GST_LOG_OBJECT (thepad, "caps don't have streamheader");
}
} }
gst_caps_unref (caps); gst_caps_unref (caps);
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment