Skip to content

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

Merged

Conversation

cchampet
Copy link
Member

@cchampet cchampet commented Jun 3, 2014

AVFrame has no "channels" attribute in LibAv. We should use
"av_get_channel_layout_nb_channels" on the "channel_layouts".

Clement Champetier added 4 commits June 3, 2014 14:08
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.
@cchampet cchampet changed the title InputStreamAudio: fix compile error with libAv Audio: encode process Jun 3, 2014
* This new function gets delayed encoded frames.
* Rewrapper: call this new function.
bool encodeFrame( const AudioFrame& decodedFrame, DataStream& codedFrame );

/**
* get delayed encoded frames
Copy link

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?

Copy link
Member

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.

Copy link
Contributor

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...

Copy link
Member

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

www.mikrosimage.eu

MarcAntoine-Arnaud added a commit that referenced this pull request Jun 4, 2014
@MarcAntoine-Arnaud MarcAntoine-Arnaud merged commit 9feb59f into avTranscoder:master Jun 4, 2014
valnoel pushed a commit to valnoel/avTranscoder that referenced this pull request Dec 3, 2014
Fix block_align and audio demux without specified an output profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants