aacparse->channels = (buffer[1] & 0x78) >> 3;
aacparse->header_type = DSPAAC_HEADER_NONE;
aacparse->mpegversion = 4;
+ aacparse->frame_samples = (buffer[1] & 4) ? 960 : 1024;
- GST_DEBUG ("codec_data: object_type=%d, sample_rate=%d, channels=%d",
- aacparse->object_type, aacparse->sample_rate, aacparse->channels);
+ GST_DEBUG ("codec_data: object_type=%d, sample_rate=%d, channels=%d, "
+ "samples=%d", aacparse->object_type, aacparse->sample_rate,
+ aacparse->channels, aacparse->frame_samples);
/* arrange for metadata and get out of the way */
gst_aac_parse_set_src_caps (aacparse, caps);
gst_aac_parse_parse_adts_header (aacparse, data, &rate, &channels,
&aacparse->object_type, &aacparse->mpegversion);
- gst_base_parse_set_frame_rate (GST_BASE_PARSE (aacparse), rate, 1024, 2, 2);
+ gst_base_parse_set_frame_rate (GST_BASE_PARSE (aacparse), rate,
+ aacparse->frame_samples, 2, 2);
GST_DEBUG ("ADTS: samplerate %d, channels %d, objtype %d, version %d",
rate, channels, aacparse->object_type, aacparse->mpegversion);
}
gst_base_parse_set_frame_rate (GST_BASE_PARSE (aacparse),
- aacparse->sample_rate, 1024, 2, 2);
+ aacparse->sample_rate, aacparse->frame_samples, 2, 2);
}
return ret;
aacparse = GST_AAC_PARSE (parse);
GST_DEBUG ("start");
+ aacparse->frame_samples = 1024;
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (aacparse), ADTS_MAX_SIZE);
return TRUE;
}
/**
* GstAacParse:
- * @element: the parent element.
- * @object_type: AAC object type of the stream.
- * @bitrate: Current media bitrate.
- * @sample_rate: Current media samplerate.
- * @channels: Current media channel count.
- * @frames_per_sec: FPS value of the current stream.
- * @header_type: #GstAacHeaderType indicating the current stream type.
- * @framecount: The amount of frames that has been processed this far.
- * @bytecount: The amount of bytes that has been processed this far.
- * @sync: Tells whether the parser is in sync (a.k.a. not searching for header)
- * @eos: End-of-Stream indicator. Set when EOS event arrives.
- * @duration: Duration of the current stream.
- * @ts: Current stream timestamp.
*
* The opaque GstAacParse data structure.
*/
gint sample_rate;
gint channels;
gint mpegversion;
+ gint frame_samples;
GstAacHeaderType header_type;
};