mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
validate:media-descriptor-writer: Handle medias with 1 single stream
This commit is contained in:
parent
fa35a10779
commit
f8a37a1c80
1 changed files with 14 additions and 9 deletions
|
@ -464,8 +464,8 @@ _run_frame_analisis (GstMediaDescriptorWriter * writer,
|
|||
writer->priv->pipeline = gst_pipeline_new ("frame-analisis");
|
||||
|
||||
monitor =
|
||||
gst_validate_monitor_factory_create (GST_OBJECT_CAST (writer->
|
||||
priv->pipeline), runner, NULL);
|
||||
gst_validate_monitor_factory_create (GST_OBJECT_CAST (writer->priv->
|
||||
pipeline), runner, NULL);
|
||||
gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (monitor));
|
||||
|
||||
g_object_set (uridecodebin, "uri", uri, "caps", writer->priv->raw_caps, NULL);
|
||||
|
@ -501,7 +501,7 @@ GstMediaDescriptorWriter *
|
|||
gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
||||
const gchar * uri, gboolean full, GError ** err)
|
||||
{
|
||||
GList *tmp, *streams;
|
||||
GList *tmp, *streams = NULL;
|
||||
GstDiscovererInfo *info;
|
||||
GstDiscoverer *discoverer;
|
||||
GstDiscovererStreamInfo *streaminfo;
|
||||
|
@ -535,6 +535,8 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
|||
gst_discoverer_info_get_tags (info));
|
||||
|
||||
streaminfo = gst_discoverer_info_get_stream_info (info);
|
||||
|
||||
if (GST_IS_DISCOVERER_CONTAINER_INFO (streaminfo)) {
|
||||
((GstMediaDescriptor *) writer)->filenode->caps =
|
||||
gst_discoverer_stream_info_get_caps (GST_DISCOVERER_STREAM_INFO
|
||||
(streaminfo));
|
||||
|
@ -543,6 +545,9 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
|||
for (tmp = streams; tmp; tmp = tmp->next) {
|
||||
gst_media_descriptor_writer_add_stream (writer, tmp->data);
|
||||
}
|
||||
} else {
|
||||
gst_media_descriptor_writer_add_stream (writer, streaminfo);
|
||||
}
|
||||
|
||||
if (streams == NULL)
|
||||
writer->priv->raw_caps =
|
||||
|
|
Loading…
Reference in a new issue