Administrator
|
Hi,
When my allowed caps in aac encoder has array of stream-formats i.e., stream-format={raw,adts}, gst_structure_get_string() returns NULL But when it is a scalar i.e, stream-format={raw} it returns non NULL My question is how to read array of strings in GstStructure? I see a bug in faac encoder due to this in following lines if ((str = gst_structure_get_string (s, "stream-format"))) { if (strcmp (str, "adts") == 0) { GST_DEBUG_OBJECT (faac, "use ADTS format for output"); faac->outputformat = 1; } else if (strcmp (str, "raw") == 0) { GST_DEBUG_OBJECT (faac, "use RAW format for output"); faac->outputformat = 0; } else { GST_DEBUG_OBJECT (faac, "unknown stream-format: %s", str); faac->outputformat = 0; } } |
On Tue, 2016-08-30 at 04:05 -0700, Baby Octopus wrote:
> Hi, > > When my allowed caps in aac encoder has array of stream-formats i.e., > stream-format={raw,adts}, gst_structure_get_string() returns NULL > > But when it is a scalar i.e, > stream-format={raw} it returns non NULL > > My question is how to read array of strings in GstStructure? I see a > bug in faac encoder due to this in following lines > if ((str = gst_structure_get_string (s, "stream-format"))) { > if (strcmp (str, "adts") == 0) { > GST_DEBUG_OBJECT (faac, "use ADTS format for output"); > faac->outputformat = 1; > } else if (strcmp (str, "raw") == 0) { > GST_DEBUG_OBJECT (faac, "use RAW format for output"); > faac->outputformat = 0; > } else { > GST_DEBUG_OBJECT (faac, "unknown stream-format: %s", str); > faac->outputformat = 0; > } > } are fixated before that already so that only a single string is left. For handling these arrays, check the gst_value_list_*() API. Note that you don't want the gst_value_array_*() API here. -- Sebastian Dröge, Centricular Ltd · http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (949 bytes) Download Attachment |
Administrator
|
On Wed, Aug 31, 2016 at 12:27 PM, Sebastian Dröge-3 [via GStreamer-devel] <[hidden email]> wrote: On Tue, 2016-08-30 at 04:05 -0700, Baby Octopus wrote: I don't think we can assume that. Can we? When the encoder and the muxer support multiple stream-formats, its upto the encoder to decide which stream-format to choose. Isn't it?
Thank you very much. Let me try this
|
Free forum by Nabble | Edit this page |