flvmux, matroskamux, qtmux: if in doubt about downstream seekability default to streaming=true

If downstream didn't answer our SEEKING query and told us
it's seekable, default to streaming=true. We couldn't do
this in 0.10 for backwards compatibility reasons, but we
can in 0.11. Play it safe.
This commit is contained in:
Tim-Philipp Müller 2012-02-27 01:09:11 +00:00
parent f49410d698
commit cc0511f5d8
3 changed files with 24 additions and 24 deletions

View file

@ -1153,17 +1153,17 @@ gst_flv_mux_write_header (GstFlvMux * mux)
if (gst_pad_peer_query (mux->srcpad, query)) { if (gst_pad_peer_query (mux->srcpad, query)) {
gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
GST_INFO_OBJECT (mux, "downstream is %sseekable", seekable ? "" : "not "); 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 { } else {
/* have to assume seeking is supported if query not handled downstream */ /* 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"); GST_WARNING_OBJECT (mux, "downstream did not handle seeking query");
seekable = FALSE;
}
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");
} }
} }

View file

@ -1639,17 +1639,17 @@ gst_qt_mux_start_file (GstQTMux * qtmux)
gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
GST_INFO_OBJECT (qtmux, "downstream is %sseekable", GST_INFO_OBJECT (qtmux, "downstream is %sseekable",
seekable ? "" : "not "); 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 { } else {
/* have to assume seeking is supported if query not handled downstream */ /* 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"); GST_WARNING_OBJECT (qtmux, "downstream did not handle seeking query");
seekable = FALSE;
}
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");
} }
} }

View file

@ -2349,17 +2349,17 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
if (gst_pad_peer_query (mux->srcpad, query)) { if (gst_pad_peer_query (mux->srcpad, query)) {
gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
GST_INFO_OBJECT (mux, "downstream is %sseekable", seekable ? "" : "not "); 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 { } else {
/* have to assume seeking is supported if query not handled downstream */ /* 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"); GST_WARNING_OBJECT (mux, "downstream did not handle seeking query");
seekable = FALSE;
}
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");
} }
} }