mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 05:52:37 +00:00
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:
parent
f49410d698
commit
cc0511f5d8
3 changed files with 24 additions and 24 deletions
|
@ -1153,6 +1153,11 @@ 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 ");
|
||||||
|
} else {
|
||||||
|
/* have to assume seeking is supported if query not handled downstream */
|
||||||
|
GST_WARNING_OBJECT (mux, "downstream did not handle seeking query");
|
||||||
|
seekable = FALSE;
|
||||||
|
}
|
||||||
if (!seekable) {
|
if (!seekable) {
|
||||||
mux->streamable = TRUE;
|
mux->streamable = TRUE;
|
||||||
g_object_notify (G_OBJECT (mux), "streamable");
|
g_object_notify (G_OBJECT (mux), "streamable");
|
||||||
|
@ -1160,11 +1165,6 @@ gst_flv_mux_write_header (GstFlvMux * mux)
|
||||||
"streamable=false. Will ignore that and create streamable output "
|
"streamable=false. Will ignore that and create streamable output "
|
||||||
"instead");
|
"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);
|
header = gst_flv_mux_create_header (mux);
|
||||||
|
|
|
@ -1639,6 +1639,11 @@ 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 ");
|
||||||
|
} else {
|
||||||
|
/* have to assume seeking is supported if query not handled downstream */
|
||||||
|
GST_WARNING_OBJECT (qtmux, "downstream did not handle seeking query");
|
||||||
|
seekable = FALSE;
|
||||||
|
}
|
||||||
if (!seekable) {
|
if (!seekable) {
|
||||||
qtmux->streamable = TRUE;
|
qtmux->streamable = TRUE;
|
||||||
g_object_notify (G_OBJECT (qtmux), "streamable");
|
g_object_notify (G_OBJECT (qtmux), "streamable");
|
||||||
|
@ -1646,11 +1651,6 @@ gst_qt_mux_start_file (GstQTMux * qtmux)
|
||||||
"streamable=false. Will ignore that and create streamable output "
|
"streamable=false. Will ignore that and create streamable output "
|
||||||
"instead");
|
"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 */
|
/* let downstream know we think in BYTES and expect to do seeking later on */
|
||||||
|
|
|
@ -2349,6 +2349,11 @@ 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 ");
|
||||||
|
} else {
|
||||||
|
/* have to assume seeking is supported if query not handled downstream */
|
||||||
|
GST_WARNING_OBJECT (mux, "downstream did not handle seeking query");
|
||||||
|
seekable = FALSE;
|
||||||
|
}
|
||||||
if (!seekable) {
|
if (!seekable) {
|
||||||
mux->streamable = TRUE;
|
mux->streamable = TRUE;
|
||||||
g_object_notify (G_OBJECT (mux), "streamable");
|
g_object_notify (G_OBJECT (mux), "streamable");
|
||||||
|
@ -2356,11 +2361,6 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
|
||||||
"streamable=false. Will ignore that and create streamable output "
|
"streamable=false. Will ignore that and create streamable output "
|
||||||
"instead");
|
"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)) {
|
if (!strcmp (mux->doctype, GST_MATROSKA_DOCTYPE_WEBM)) {
|
||||||
|
|
Loading…
Reference in a new issue