-
Notifications
You must be signed in to change notification settings - Fork 50
Audio: encode process #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio: encode process #5
Conversation
AVFrame has no "channels" attribute in LibAv. We should use "av_get_channel_layout_nb_channels" on the "channel_layouts".
* Use av_samples_copy instead of av_samples_fill_arrays to copy the frame data to our DataBuffer. * Get nb_channels by the CodecContext, intead of av_get_channel_layout_nb_channels (see commit 1cdebe6). * Throw a more specific runtime_error if an error occured during audio decoding.
* OutputStreamAudio: * define setup to open codec. * define encodeFrame. * AudioFrame: add nbSamples attribute to get the number of samples to transcode. * InputStreamAudio: * delete print. * set number of samples decoded in the AudioFrame ; get this value during encode. * Update Rewrapper: add encode and wrap process.
* This new function gets delayed encoded frames. * Rewrapper: call this new function.
bool encodeFrame( const AudioFrame& decodedFrame, DataStream& codedFrame ); | ||
|
||
/** | ||
* get delayed encoded frames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain more?
From where the input comes from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Itr's similar to video processing.
AudioFrame is the raw sound of data, like an image in video.
And the DataStream is the coded data.
I don't have doxygen generation on API, but need to provide it for adding correct documentation when API is a little more stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question was about "encodeFrame( DataStream& codedFrame )" which has no decodedFrame argument.
Documentation can't be done at the end...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoo yep !
It's for ending last frame with data buffered in coder.
Also similar to video where latency can be not null ... due to a
reoganization of video frames or packetisation of audio streams.
2014-06-04 11:20 GMT+02:00 Fabien Castan notifications@github.com:
In src/AvTranscoder/OutputStreamAudio.hpp:
-private:
- /**
- * @param[out] codedFrame
- */
- bool encodeFrame( const AudioFrame& decodedFrame, DataStream& codedFrame );
- /**
- * get delayed encoded frames
My question was about "encodeFrame( DataStream& codedFrame )" which has no
decodedFrame argument.
Documentation can't be done at the end...—
Reply to this email directly or view it on GitHub
https://github.com/MarcAntoine-Arnaud/avTranscoder/pull/5/files#r13377592
.
[image: Mikros Image - Pub Evian Spider-man the amazing babyme 2]
http://www.mikrosimage.eu/realisations/pub-l-evian-spider-man-the-amazing-babyme-2/
Marc-Antoine ARNAUD
R&D Software Developer -
Image Processing & Media Technology Expert
+33 1 55 63 11 00
mrn@mikrosimage.eu
Mikros Image /
Digital Post-Production for Video and Film
Audio: encode process
Fix block_align and audio demux without specified an output profile
AVFrame has no "channels" attribute in LibAv. We should use
"av_get_channel_layout_nb_channels" on the "channel_layouts".