}
static GstCaps *
-_gst_mss_stream_video_caps_from_qualitylevel_xml (xmlNodePtr node)
+_gst_mss_stream_video_caps_from_qualitylevel_xml (GstMssStreamQuality * q)
{
+ xmlNodePtr node = q->xmlnode;
GstCaps *caps;
GstStructure *structure;
gchar *fourcc = (gchar *) xmlGetProp (node, (xmlChar *) "FourCC");
}
static GstCaps *
-_gst_mss_stream_audio_caps_from_qualitylevel_xml (xmlNodePtr node)
+_gst_mss_stream_audio_caps_from_qualitylevel_xml (GstMssStreamQuality * q)
{
+ xmlNodePtr node = q->xmlnode;
GstCaps *caps;
GstStructure *structure;
gchar *fourcc = (gchar *) xmlGetProp (node, (xmlChar *) "FourCC");
gst_structure_set (structure, "rate", G_TYPE_INT,
(int) g_ascii_strtoull (rate, NULL, 10), NULL);
}
+ if (q->bitrate) {
+ gst_structure_set (structure, "bitrate", G_TYPE_INT, q->bitrate, NULL);
+ }
if (codec_data && strlen (codec_data)) {
GstBuffer *buffer = gst_buffer_from_hex_string ((gchar *) codec_data);
if (streamtype == MSS_STREAM_TYPE_VIDEO)
caps =
_gst_mss_stream_video_caps_from_qualitylevel_xml
- (qualitylevel->xmlnode);
+ (qualitylevel);
else if (streamtype == MSS_STREAM_TYPE_AUDIO)
caps =
_gst_mss_stream_audio_caps_from_qualitylevel_xml
- (qualitylevel->xmlnode);
+ (qualitylevel);
return caps;
}