mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
ogg: update for media type typefinding changes
This commit is contained in:
parent
497d87061d
commit
05b1ad1b56
2 changed files with 15 additions and 6 deletions
|
@ -1915,7 +1915,9 @@ static GstStaticPadTemplate ogg_demux_sink_template_factory =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("application/ogg; application/x-annodex")
|
GST_STATIC_CAPS ("application/ogg; audio/ogg; video/ogg; "
|
||||||
|
"application/annodex; audio/annodex; video/annodex; "
|
||||||
|
"application/kate")
|
||||||
);
|
);
|
||||||
|
|
||||||
static void gst_ogg_demux_finalize (GObject * object);
|
static void gst_ogg_demux_finalize (GObject * object);
|
||||||
|
|
|
@ -97,7 +97,7 @@ enum
|
||||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("application/ogg")
|
GST_STATIC_CAPS ("application/ogg; audio/ogg; video/ogg")
|
||||||
);
|
);
|
||||||
|
|
||||||
static GstStaticPadTemplate video_sink_factory =
|
static GstStaticPadTemplate video_sink_factory =
|
||||||
|
@ -1521,12 +1521,19 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
|
||||||
/* hbufs holds all buffers for the headers now */
|
/* hbufs holds all buffers for the headers now */
|
||||||
|
|
||||||
/* create caps with the buffers */
|
/* create caps with the buffers */
|
||||||
caps = gst_pad_query_caps (mux->srcpad, NULL);
|
/* FIXME: should prefer media type audio/ogg, video/ogg, etc. depending on
|
||||||
|
* what we create, if acceptable downstream (instead of defaulting to
|
||||||
|
* application/ogg because that's the first in the template caps) */
|
||||||
|
caps = gst_pad_get_allowed_caps (mux->srcpad);
|
||||||
|
if (caps) {
|
||||||
|
if (!gst_caps_is_fixed (caps))
|
||||||
|
caps = gst_caps_fixate (caps);
|
||||||
if (caps) {
|
if (caps) {
|
||||||
caps = gst_ogg_mux_set_header_on_caps (caps, hbufs);
|
caps = gst_ogg_mux_set_header_on_caps (caps, hbufs);
|
||||||
gst_pad_set_caps (mux->srcpad, caps);
|
gst_pad_set_caps (mux->srcpad, caps);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* and send the buffers */
|
/* and send the buffers */
|
||||||
while (hbufs != NULL) {
|
while (hbufs != NULL) {
|
||||||
GstBuffer *buf = GST_BUFFER (hbufs->data);
|
GstBuffer *buf = GST_BUFFER (hbufs->data);
|
||||||
|
|
Loading…
Reference in a new issue