Skip to content

Common naming nomenclature - second step #103

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
merged 59 commits into from
Oct 16, 2014

Conversation

cchampet
Copy link
Member

@cchampet cchampet commented Oct 6, 2014

  • Clean option.
  • Clean common.
  • Rename CodedDesc to Codec (files and classes).
  • Rename EssenceTransform to Transform (folder, files and classes).
  • Rename essenceStructures to frame (folder).
  • Using common naming nomenclature #95

Clement Champetier and others added 20 commits September 24, 2014 17:45
* Use AVRationnal instead.
* VideoFrame: add getDarNum and getDarDen to get values of rational
whithout manipulate AVRational.
* AVRational has no constructor to initialize its attributes: initialize
AVRational in our classes.
* Create the new Context class in new files (hpp + cpp): no reason to
have it in common.
* Get Context files in option folder.
* Get our corresponding type of AVOption in the constructor.
* Function getTypeFromAVOption is private and is only used in the
constructor.
* Update OptionLoader: if a user wants the type of an option, he can use
option.getType().
* Context:
     * has a map of options.
     * has a link to its corresponding avContext.
     * has getter to any of his options.
     * remove setters (the option has the setters).
* Option:
     * has a link to an AVOption.
     * has a link to its corresponding avContext.
     * has setters.
     * rename _options to _childOptions.
* When we want to set a value of an AVOption:
     * get an Option by a Context.
     * set its value by a set of Option.
* No more OptionLoader class: the options are manage by Context and
Option classes.
* Keep utilities functions of OptionLoader in a new file named util.
* Context:
     * add getOptions and getOptionsMap.
     * add documentation.
* OptionChecker app: fit to new architecture.
* FormatContext enbale to get options whithout care about allocate and
free an AVFormatContext: this is the job of the class.
* CodecContext enbale to get options whithout care about allocate and
free an AVCodecContext: this is the job of the class.
* Rename Context files to context.
* Rename codedStructures folder to codec.
* Rename CodedDesc to ICodec.
* Rename VideoDesc, AudioDesc, DataDesc to VideoCodec, AudioCodec,
DataCodec.
Automatically generated.
…t in CodecContext

* Call the loadOptions from the constructors of FormatContext and
CodecContext.
* Context: need to add a default constructor.
* Rename folder 'essenceTransform' to 'transform'.
* Rename files to ITransform, VideoTransform and AudioTransform.
* Rename classes to ITransform, VideoTransform and AudioTransform.
* No sense to have transforms for coded data. So transforms are
implicitly for essence (decoded) data.
The folder contains all classes about frame.
* Duplicate with Frame class.
* Add a typedef of Frame, CodedData, to represent buffer of coded data.
* In constructor, instanciate a videoCodec, or an AudioCodec, or a
DataCodec.
* Get the codec with getter (use reference).
* Indentation.
* Implement constructor per copy in cpp.
@cchampet cchampet force-pushed the dev_clean_refactoring branch from 7c4a709 to 312e619 Compare October 6, 2014 13:30
@cchampet cchampet force-pushed the dev_clean_refactoring branch from 9c7d092 to 2158fa0 Compare October 6, 2014 14:52
@MarcAntoine-Arnaud MarcAntoine-Arnaud self-assigned this Oct 7, 2014
Clement Champetier added 6 commits October 9, 2014 11:49
* Remove unnecessary includes.
* Clean FFmpeg forward declarations: declare the right type (struct or
enum). Avoid warning when compile on MAC OS and Windows.
This #define is already define in common.hpp. Not necessary to rewrite
it in every files.
Use only references as parameters to have unified API.
Use getChilds().size().
* hasChild function uses vector::size().
* getChilds function is const.
Provide pure virtual destructor.
* Symmetry with AvOutputAudio:
    * use an AudioCodec.
    * no need to allocate and free AV codec objects ; it is done by our
ICodec class.
* Symmetry with AvOutputVideo:
    * use a VideoCodec.
    * no need to allocate and free AV codec objects ; it is done by our
ICodec class.
* Define destructor the same way as IInputEssence.
Remove unnecessary "this".
For some FFmpeg versions, we need to include <libavutil/mem.h> to get
av_free function.
@cchampet cchampet force-pushed the dev_clean_refactoring branch from 02d1c73 to 7cdb5d7 Compare October 12, 2014 15:31
Clement Champetier added 4 commits October 13, 2014 13:49
* Print warning, and not allocate AVCodec.
* Same idea in ffprobe: warn the user of the unsupported codec, but
allow him to manage other streams of the input file.
* Remove comments.
* Add @todo.
* Symmetry with readNextFrame with a subStreamIndex: use variables to
get "src" and "dst" when copy samples.
By default, a user doesn't want all printed on console.
* These functions threw a runtime_error with error named "SUCCESS".
* No visible consequences because we caught them when setProfile...
@cchampet
Copy link
Member Author

@MarcAntoine-Arnaud What do you think of this version ?

@MarcAntoine-Arnaud
Copy link
Member

In ICodec, is it possible to update:
setDecoderCodec adn setEncoderCodec with setCodec
Because Decoder or Encoder will be selected at the construction with the enum.
You can use it to switch on the value.

@MarcAntoine-Arnaud
Copy link
Member

avcodec_register_all() can be call more than one time.
In FFMpeg/Libav code they detect if codecs are registered.
I think you can remove comments.

Clement Champetier added 10 commits October 16, 2014 16:09
Merge in one function: setCodec.
* avcodec_register_all() can be call more than one time.
* In FFMpeg/Libav code they detect if codecs are registered.
Also reorder initialization of attributes in constructor.
Also rename getSampleFormat to getAVSampleFormat in this class.
* According to the class name "AudioCodec".
* "getAudioCodec" returns a reference instead of make a copy.
* Rename "setAudioDesc" to "setAudioCodec".
* According to the class name "VideoCodec".
* "getVideoCodec" returns a reference instead of make a copy.
* Rename "setVideoDesc" to "setVideoCodec".
MarcAntoine-Arnaud added a commit that referenced this pull request Oct 16, 2014
Common naming nomenclature - second step
@MarcAntoine-Arnaud MarcAntoine-Arnaud merged commit 59e7340 into avTranscoder:master Oct 16, 2014
@cchampet cchampet deleted the dev_clean_refactoring branch October 27, 2014 10:57
cchampet pushed a commit to cchampet/avTranscoder that referenced this pull request Mar 4, 2015
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.

3 participants