mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
Merge remote-tracking branch 'origin/master' into 0.11
Conflicts: gst/audioparsers/gstmpegaudioparse.c
This commit is contained in:
commit
f49410d698
4 changed files with 71 additions and 1 deletions
|
@ -571,7 +571,7 @@ gst_mp3parse_find_freerate (GstMpegAudioParse * mp3parse, GstMapInfo * map,
|
|||
}
|
||||
|
||||
if (valid) {
|
||||
GST_LOG_OBJECT (mp3parse, "calculated rate %d", rate * 1000);
|
||||
GST_LOG_OBJECT (mp3parse, "calculated rate %lu", rate * 1000);
|
||||
if (rate < 8 || (layer == 3 && rate > 640)) {
|
||||
GST_DEBUG_OBJECT (mp3parse, "rate invalid");
|
||||
if (rate < 8) {
|
||||
|
|
|
@ -1144,6 +1144,29 @@ gst_flv_mux_write_header (GstFlvMux * mux)
|
|||
GSList *l;
|
||||
GstFlowReturn ret;
|
||||
|
||||
/* if not streaming, check if downstream is seekable */
|
||||
if (!mux->streamable) {
|
||||
gboolean seekable;
|
||||
GstQuery *query;
|
||||
|
||||
query = gst_query_new_seeking (GST_FORMAT_BYTES);
|
||||
if (gst_pad_peer_query (mux->srcpad, query)) {
|
||||
gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
|
||||
GST_INFO_OBJECT (mux, "downstream is %sseekable", seekable ? "" : "not ");
|
||||
if (!seekable) {
|
||||
mux->streamable = TRUE;
|
||||
g_object_notify (G_OBJECT (mux), "streamable");
|
||||
GST_WARNING_OBJECT (mux, "downstream is not seekable, but "
|
||||
"streamable=false. Will ignore that and create streamable output "
|
||||
"instead");
|
||||
}
|
||||
} else {
|
||||
/* have to assume seeking is supported if query not handled downstream */
|
||||
/* FIXME 0.11: change to query not handled => seeking not supported */
|
||||
GST_WARNING_OBJECT (mux, "downstream did not handle seeking query");
|
||||
}
|
||||
}
|
||||
|
||||
header = gst_flv_mux_create_header (mux);
|
||||
metadata = gst_flv_mux_create_metadata (mux, TRUE);
|
||||
video_codec_data = NULL;
|
||||
|
|
|
@ -1629,6 +1629,30 @@ gst_qt_mux_start_file (GstQTMux * qtmux)
|
|||
gst_pad_set_caps (qtmux->srcpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
/* if not streaming, check if downstream is seekable */
|
||||
if (!qtmux->streamable) {
|
||||
gboolean seekable;
|
||||
GstQuery *query;
|
||||
|
||||
query = gst_query_new_seeking (GST_FORMAT_BYTES);
|
||||
if (gst_pad_peer_query (qtmux->srcpad, query)) {
|
||||
gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
|
||||
GST_INFO_OBJECT (qtmux, "downstream is %sseekable",
|
||||
seekable ? "" : "not ");
|
||||
if (!seekable) {
|
||||
qtmux->streamable = TRUE;
|
||||
g_object_notify (G_OBJECT (qtmux), "streamable");
|
||||
GST_WARNING_OBJECT (qtmux, "downstream is not seekable, but "
|
||||
"streamable=false. Will ignore that and create streamable output "
|
||||
"instead");
|
||||
}
|
||||
} else {
|
||||
/* have to assume seeking is supported if query not handled downstream */
|
||||
/* FIXME 0.11: change to query not handled => seeking not supported */
|
||||
GST_WARNING_OBJECT (qtmux, "downstream did not handle seeking query");
|
||||
}
|
||||
}
|
||||
|
||||
/* let downstream know we think in BYTES and expect to do seeking later on */
|
||||
gst_segment_init (&segment, GST_FORMAT_BYTES);
|
||||
gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment));
|
||||
|
|
|
@ -2340,6 +2340,29 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
|
|||
guint32 segment_uid[4];
|
||||
GTimeVal time = { 0, 0 };
|
||||
|
||||
/* if not streaming, check if downstream is seekable */
|
||||
if (!mux->streamable) {
|
||||
gboolean seekable;
|
||||
GstQuery *query;
|
||||
|
||||
query = gst_query_new_seeking (GST_FORMAT_BYTES);
|
||||
if (gst_pad_peer_query (mux->srcpad, query)) {
|
||||
gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
|
||||
GST_INFO_OBJECT (mux, "downstream is %sseekable", seekable ? "" : "not ");
|
||||
if (!seekable) {
|
||||
mux->streamable = TRUE;
|
||||
g_object_notify (G_OBJECT (mux), "streamable");
|
||||
GST_WARNING_OBJECT (mux, "downstream is not seekable, but "
|
||||
"streamable=false. Will ignore that and create streamable output "
|
||||
"instead");
|
||||
}
|
||||
} else {
|
||||
/* have to assume seeking is supported if query not handled downstream */
|
||||
/* FIXME 0.11: change to query not handled => seeking not supported */
|
||||
GST_WARNING_OBJECT (mux, "downstream did not handle seeking query");
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp (mux->doctype, GST_MATROSKA_DOCTYPE_WEBM)) {
|
||||
ebml->caps = gst_caps_new_empty_simple ("video/webm");
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue