summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34ef8dc)
raw | patch | inline | side by side (parent: 34ef8dc)
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | |
Sat, 30 Jul 2011 21:47:44 +0000 (18:47 -0300) | ||
committer | Nikhil Devshatwar <a0132237@ti.com> | |
Fri, 17 May 2013 09:40:36 +0000 (15:10 +0530) |
Do not forget to set the selected format to the options string
when getting it from caps
https://bugzilla.gnome.org/show_bug.cgi?id=655223
when getting it from caps
https://bugzilla.gnome.org/show_bug.cgi?id=655223
ext/x264/gstx264enc.c | patch | blob | history |
diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c
index 08c930b43b4cde2d2a58bc7ae9a860e98ffd1b3e..3aa02feadc5c84e396764bb8771711511f880d0c 100644 (file)
--- a/ext/x264/gstx264enc.c
+++ b/ext/x264/gstx264enc.c
peer_caps = gst_pad_peer_get_caps_reffed (encoder->srcpad);
if (peer_caps) {
gint i;
- gboolean has_profile_or_level = FALSE;
+ gboolean has_profile_or_level_or_format = FALSE;
for (i = 0; i < gst_caps_get_size (peer_caps); i++) {
GstStructure *s = gst_caps_get_structure (peer_caps, i);
if (gst_structure_has_name (s, "video/x-h264") &&
(gst_structure_has_field (s, "profile") ||
- gst_structure_has_field (s, "level"))) {
- has_profile_or_level = TRUE;
+ gst_structure_has_field (s, "level") ||
+ gst_structure_has_field (s, "stream-format"))) {
+ has_profile_or_level_or_format = TRUE;
break;
}
}
- if (has_profile_or_level) {
+ if (has_profile_or_level_or_format) {
template_caps = gst_pad_get_pad_template_caps (encoder->srcpad);
allowed_caps = gst_caps_intersect (peer_caps, template_caps);
if (stream_format) {
if (!strcmp (stream_format, "avc")) {
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_AVC;
+ g_string_append_printf (encoder->option_string, ":annexb=0");
} else if (!strcmp (stream_format, "byte-stream")) {
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_BYTE_STREAM;
+ g_string_append_printf (encoder->option_string, ":annexb=1");
} else {
/* means we have both in caps and _FROM_PROPERTY should be the option */
}