mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
av: Use */x-gst-av instead of */x-gst-ff for unknown caps
This commit is contained in:
parent
0764e9600c
commit
3a4a139a28
1 changed files with 7 additions and 7 deletions
|
@ -1709,12 +1709,12 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
||||||
|
|
||||||
switch (codec->type) {
|
switch (codec->type) {
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
mime = g_strdup_printf ("video/x-gst_ff-%s", codec->name);
|
mime = g_strdup_printf ("video/x-gst-av-%s", codec->name);
|
||||||
caps = gst_ff_vid_caps_new (context, codec_id, encode, mime, NULL);
|
caps = gst_ff_vid_caps_new (context, codec_id, encode, mime, NULL);
|
||||||
g_free (mime);
|
g_free (mime);
|
||||||
break;
|
break;
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
mime = g_strdup_printf ("audio/x-gst_ff-%s", codec->name);
|
mime = g_strdup_printf ("audio/x-gst-av-%s", codec->name);
|
||||||
caps = gst_ff_aud_caps_new (context, codec_id, encode, mime, NULL);
|
caps = gst_ff_aud_caps_new (context, codec_id, encode, mime, NULL);
|
||||||
if (context)
|
if (context)
|
||||||
gst_caps_set_simple (caps,
|
gst_caps_set_simple (caps,
|
||||||
|
@ -2771,7 +2771,7 @@ gst_ffmpeg_formatid_to_caps (const gchar * format_name)
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
|
||||||
GST_LOG ("Could not create stream format caps for %s", format_name);
|
GST_LOG ("Could not create stream format caps for %s", format_name);
|
||||||
name = g_strdup_printf ("application/x-gst_ff-%s", format_name);
|
name = g_strdup_printf ("application/x-gst-av-%s", format_name);
|
||||||
caps = gst_caps_new_empty_simple (name);
|
caps = gst_caps_new_empty_simple (name);
|
||||||
g_free (name);
|
g_free (name);
|
||||||
}
|
}
|
||||||
|
@ -3468,24 +3468,24 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
|
||||||
} else if (!strcmp (mimetype, "audio/x-nellymoser")) {
|
} else if (!strcmp (mimetype, "audio/x-nellymoser")) {
|
||||||
id = CODEC_ID_NELLYMOSER;
|
id = CODEC_ID_NELLYMOSER;
|
||||||
audio = TRUE;
|
audio = TRUE;
|
||||||
} else if (!strncmp (mimetype, "audio/x-gst_ff-", 15)) {
|
} else if (!strncmp (mimetype, "audio/x-gst-av-", 15)) {
|
||||||
gchar ext[16];
|
gchar ext[16];
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
|
|
||||||
if (strlen (mimetype) <= 30 &&
|
if (strlen (mimetype) <= 30 &&
|
||||||
sscanf (mimetype, "audio/x-gst_ff-%s", ext) == 1) {
|
sscanf (mimetype, "audio/x-gst-av-%s", ext) == 1) {
|
||||||
if ((codec = avcodec_find_decoder_by_name (ext)) ||
|
if ((codec = avcodec_find_decoder_by_name (ext)) ||
|
||||||
(codec = avcodec_find_encoder_by_name (ext))) {
|
(codec = avcodec_find_encoder_by_name (ext))) {
|
||||||
id = codec->id;
|
id = codec->id;
|
||||||
audio = TRUE;
|
audio = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!strncmp (mimetype, "video/x-gst_ff-", 15)) {
|
} else if (!strncmp (mimetype, "video/x-gst-av-", 15)) {
|
||||||
gchar ext[16];
|
gchar ext[16];
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
|
|
||||||
if (strlen (mimetype) <= 30 &&
|
if (strlen (mimetype) <= 30 &&
|
||||||
sscanf (mimetype, "video/x-gst_ff-%s", ext) == 1) {
|
sscanf (mimetype, "video/x-gst-av-%s", ext) == 1) {
|
||||||
if ((codec = avcodec_find_decoder_by_name (ext)) ||
|
if ((codec = avcodec_find_decoder_by_name (ext)) ||
|
||||||
(codec = avcodec_find_encoder_by_name (ext))) {
|
(codec = avcodec_find_encoder_by_name (ext))) {
|
||||||
id = codec->id;
|
id = codec->id;
|
||||||
|
|
Loading…
Reference in a new issue