mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 22:48:49 +00:00
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.
This commit is contained in:
parent
977b68d779
commit
e10b075e5d
3 changed files with 44 additions and 18 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
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)
|
||||||
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 {
|
||||||
|
|
Loading…
Reference in a new issue