diff --git a/src/FFmpeg.cpp b/src/FFmpeg.cpp index 5e03bca5f..58a6ccf9f 100644 --- a/src/FFmpeg.cpp +++ b/src/FFmpeg.cpp @@ -17,7 +17,7 @@ License: GPL v2. See License.txt. // Store function pointers here when including FFmpeg.h #define DEFINE_FFMPEG_POINTERS -#include "Audacity.h" // for config*.h +#include "Audacity.h" // for config*.h #include "FFmpeg.h" #include "AudacityApp.h" #include "FileNames.h" diff --git a/src/FFmpeg.h b/src/FFmpeg.h index 8194e3887..2e0d9e2cb 100644 --- a/src/FFmpeg.h +++ b/src/FFmpeg.h @@ -132,8 +132,8 @@ extern "C" { * we need for the next bit */ #include #include -#include // for wxLogNull -#include // for wxMessageBox +#include // for wxLogNull +#include // for wxMessageBox #include #include "widgets/LinkingHtmlWindow.h" #include "FileDialog.h" diff --git a/src/export/ExportFFmpeg.cpp b/src/export/ExportFFmpeg.cpp index a5bb1c503..28c5cc9d3 100644 --- a/src/export/ExportFFmpeg.cpp +++ b/src/export/ExportFFmpeg.cpp @@ -149,13 +149,13 @@ public: private: - AVFormatContext * mEncFormatCtx; // libavformat's context for our output file - AVOutputFormat * mEncFormatDesc; // describes our output file to libavformat + AVFormatContext * mEncFormatCtx; // libavformat's context for our output file + AVOutputFormat * mEncFormatDesc; // describes our output file to libavformat int default_frame_size; - AVStream * mEncAudioStream; // the output audio stream (may remain NULL) - AVCodecContext * mEncAudioCodecCtx; // the encoder for the output audio stream - AVFifoBuffer * mEncAudioFifo; // FIFO to write incoming audio samples into - uint8_t * mEncAudioFifoOutBuf; // buffer to read _out_ of the FIFO into + AVStream * mEncAudioStream; // the output audio stream (may remain NULL) + AVCodecContext * mEncAudioCodecCtx; // the encoder for the output audio stream + AVFifoBuffer * mEncAudioFifo; // FIFO to write incoming audio samples into + uint8_t * mEncAudioFifoOutBuf; // buffer to read _out_ of the FIFO into int mEncAudioFifoOutBufSiz; wxString mName; @@ -170,12 +170,12 @@ private: ExportFFmpeg::ExportFFmpeg() : ExportPlugin() { - mEncFormatCtx = NULL; // libavformat's context for our output file - mEncFormatDesc = NULL; // describes our output file to libavformat - mEncAudioStream = NULL; // the output audio stream (may remain NULL) - mEncAudioCodecCtx = NULL; // the encoder for the output audio stream + mEncFormatCtx = NULL; // libavformat's context for our output file + mEncFormatDesc = NULL; // describes our output file to libavformat + mEncAudioStream = NULL; // the output audio stream (may remain NULL) + mEncAudioCodecCtx = NULL; // the encoder for the output audio stream #define MAX_AUDIO_PACKET_SIZE (128 * 1024) - mEncAudioFifoOutBuf = NULL; // buffer to read _out_ of the FIFO into + mEncAudioFifoOutBuf = NULL; // buffer to read _out_ of the FIFO into mEncAudioFifoOutBufSiz = 0; mSampleRate = 0; @@ -340,7 +340,7 @@ static int set_dict_int(AVDictionary **dict, const char *key, int val) bool ExportFFmpeg::InitCodecs(AudacityProject *project) { - AVCodec * codec = NULL; + AVCodec *codec = NULL; AVDictionary *options = NULL; // Configure the audio stream's codec context. @@ -603,13 +603,13 @@ bool ExportFFmpeg::Finalize() // Flush the audio FIFO and encoder. for (;;) { - AVPacket pkt; - int nFifoBytes = av_fifo_size(mEncAudioFifo); // any bytes left in audio FIFO? + AVPacket pkt; + int nFifoBytes = av_fifo_size(mEncAudioFifo); // any bytes left in audio FIFO? av_init_packet(&pkt); nEncodedBytes = 0; - int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t); + int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t); if (nAudioFrameSizeOut > mEncAudioFifoOutBufSiz || nFifoBytes > mEncAudioFifoOutBufSiz) { wxLogError(wxT("FFmpeg : ERROR - Too much remaining data.")); @@ -709,11 +709,11 @@ bool ExportFFmpeg::Finalize() bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, int frameSize) { - AVPacket pkt; - int nBytesToWrite = 0; - uint8_t * pRawSamples = NULL; - int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t); - int ret; + AVPacket pkt; + int nBytesToWrite = 0; + uint8_t *pRawSamples = NULL; + int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t); + int ret; nBytesToWrite = frameSize; pRawSamples = (uint8_t*)pFrame; @@ -737,8 +737,8 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, int frameSize) av_init_packet(&pkt); int ret= encode_audio(mEncAudioCodecCtx, - &pkt, // out - (int16_t*)mEncAudioFifoOutBuf, // in + &pkt, // out + (int16_t*)mEncAudioFifoOutBuf, // in default_frame_size); if (ret < 0) { diff --git a/src/ondemand/ODDecodeFFmpegTask.cpp b/src/ondemand/ODDecodeFFmpegTask.cpp index 8712162f8..5b97b352c 100644 --- a/src/ondemand/ODDecodeFFmpegTask.cpp +++ b/src/ondemand/ODDecodeFFmpegTask.cpp @@ -9,7 +9,7 @@ ******************************************************************/ -#include "../Audacity.h" // needed before FFmpeg.h +#include "../Audacity.h" // needed before FFmpeg.h #include // For compilers that support precompilation, includes "wx/wx.h". @@ -23,7 +23,7 @@ #ifdef USE_FFMPEG #ifdef EXPERIMENTAL_OD_FFMPEG -#include "../FFmpeg.h" // which brings in avcodec.h, avformat.h +#include "../FFmpeg.h" // which brings in avcodec.h, avformat.h #include "../import/ImportFFmpeg.h" @@ -660,5 +660,5 @@ void ODFFmpegDecoder::InsertCache(FFMpegDecodeCache* cache) { } } -#endif //EXPERIMENTAL_OD_FFMPEG +#endif //EXPERIMENTAL_OD_FFMPEG #endif //USE_FFMPEG