1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-26 00:58:37 +02:00

Replace tabs by spaces.

This commit is contained in:
benjamin.drung@gmail.com 2014-06-05 22:04:22 +00:00
parent c8d6505c64
commit 149fcafc1c
4 changed files with 28 additions and 28 deletions

View File

@ -17,7 +17,7 @@ License: GPL v2. See License.txt.
// Store function pointers here when including FFmpeg.h // Store function pointers here when including FFmpeg.h
#define DEFINE_FFMPEG_POINTERS #define DEFINE_FFMPEG_POINTERS
#include "Audacity.h" // for config*.h #include "Audacity.h" // for config*.h
#include "FFmpeg.h" #include "FFmpeg.h"
#include "AudacityApp.h" #include "AudacityApp.h"
#include "FileNames.h" #include "FileNames.h"

View File

@ -132,8 +132,8 @@ extern "C" {
* we need for the next bit */ * we need for the next bit */
#include <wx/string.h> #include <wx/string.h>
#include <wx/dynlib.h> #include <wx/dynlib.h>
#include <wx/log.h> // for wxLogNull #include <wx/log.h> // for wxLogNull
#include <wx/msgdlg.h> // for wxMessageBox #include <wx/msgdlg.h> // for wxMessageBox
#include <wx/utils.h> #include <wx/utils.h>
#include "widgets/LinkingHtmlWindow.h" #include "widgets/LinkingHtmlWindow.h"
#include "FileDialog.h" #include "FileDialog.h"

View File

@ -149,13 +149,13 @@ public:
private: private:
AVFormatContext * mEncFormatCtx; // libavformat's context for our output file AVFormatContext * mEncFormatCtx; // libavformat's context for our output file
AVOutputFormat * mEncFormatDesc; // describes our output file to libavformat AVOutputFormat * mEncFormatDesc; // describes our output file to libavformat
int default_frame_size; int default_frame_size;
AVStream * mEncAudioStream; // the output audio stream (may remain NULL) AVStream * mEncAudioStream; // the output audio stream (may remain NULL)
AVCodecContext * mEncAudioCodecCtx; // the encoder for the output audio stream AVCodecContext * mEncAudioCodecCtx; // the encoder for the output audio stream
AVFifoBuffer * mEncAudioFifo; // FIFO to write incoming audio samples into AVFifoBuffer * mEncAudioFifo; // FIFO to write incoming audio samples into
uint8_t * mEncAudioFifoOutBuf; // buffer to read _out_ of the FIFO into uint8_t * mEncAudioFifoOutBuf; // buffer to read _out_ of the FIFO into
int mEncAudioFifoOutBufSiz; int mEncAudioFifoOutBufSiz;
wxString mName; wxString mName;
@ -170,12 +170,12 @@ private:
ExportFFmpeg::ExportFFmpeg() ExportFFmpeg::ExportFFmpeg()
: ExportPlugin() : ExportPlugin()
{ {
mEncFormatCtx = NULL; // libavformat's context for our output file mEncFormatCtx = NULL; // libavformat's context for our output file
mEncFormatDesc = NULL; // describes our output file to libavformat mEncFormatDesc = NULL; // describes our output file to libavformat
mEncAudioStream = NULL; // the output audio stream (may remain NULL) mEncAudioStream = NULL; // the output audio stream (may remain NULL)
mEncAudioCodecCtx = NULL; // the encoder for the output audio stream mEncAudioCodecCtx = NULL; // the encoder for the output audio stream
#define MAX_AUDIO_PACKET_SIZE (128 * 1024) #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; mEncAudioFifoOutBufSiz = 0;
mSampleRate = 0; mSampleRate = 0;
@ -340,7 +340,7 @@ static int set_dict_int(AVDictionary **dict, const char *key, int val)
bool ExportFFmpeg::InitCodecs(AudacityProject *project) bool ExportFFmpeg::InitCodecs(AudacityProject *project)
{ {
AVCodec * codec = NULL; AVCodec *codec = NULL;
AVDictionary *options = NULL; AVDictionary *options = NULL;
// Configure the audio stream's codec context. // Configure the audio stream's codec context.
@ -603,13 +603,13 @@ bool ExportFFmpeg::Finalize()
// Flush the audio FIFO and encoder. // Flush the audio FIFO and encoder.
for (;;) for (;;)
{ {
AVPacket pkt; AVPacket pkt;
int nFifoBytes = av_fifo_size(mEncAudioFifo); // any bytes left in audio FIFO? int nFifoBytes = av_fifo_size(mEncAudioFifo); // any bytes left in audio FIFO?
av_init_packet(&pkt); av_init_packet(&pkt);
nEncodedBytes = 0; 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) { if (nAudioFrameSizeOut > mEncAudioFifoOutBufSiz || nFifoBytes > mEncAudioFifoOutBufSiz) {
wxLogError(wxT("FFmpeg : ERROR - Too much remaining data.")); wxLogError(wxT("FFmpeg : ERROR - Too much remaining data."));
@ -709,11 +709,11 @@ bool ExportFFmpeg::Finalize()
bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, int frameSize) bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, int frameSize)
{ {
AVPacket pkt; AVPacket pkt;
int nBytesToWrite = 0; int nBytesToWrite = 0;
uint8_t * pRawSamples = NULL; uint8_t *pRawSamples = NULL;
int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t); int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t);
int ret; int ret;
nBytesToWrite = frameSize; nBytesToWrite = frameSize;
pRawSamples = (uint8_t*)pFrame; pRawSamples = (uint8_t*)pFrame;
@ -737,8 +737,8 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, int frameSize)
av_init_packet(&pkt); av_init_packet(&pkt);
int ret= encode_audio(mEncAudioCodecCtx, int ret= encode_audio(mEncAudioCodecCtx,
&pkt, // out &pkt, // out
(int16_t*)mEncAudioFifoOutBuf, // in (int16_t*)mEncAudioFifoOutBuf, // in
default_frame_size); default_frame_size);
if (ret < 0) if (ret < 0)
{ {

View File

@ -9,7 +9,7 @@
******************************************************************/ ******************************************************************/
#include "../Audacity.h" // needed before FFmpeg.h #include "../Audacity.h" // needed before FFmpeg.h
#include <wx/wxprec.h> #include <wx/wxprec.h>
// For compilers that support precompilation, includes "wx/wx.h". // For compilers that support precompilation, includes "wx/wx.h".
@ -23,7 +23,7 @@
#ifdef USE_FFMPEG #ifdef USE_FFMPEG
#ifdef EXPERIMENTAL_OD_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" #include "../import/ImportFFmpeg.h"
@ -660,5 +660,5 @@ void ODFFmpegDecoder::InsertCache(FFMpegDecodeCache* cache) {
} }
} }
#endif //EXPERIMENTAL_OD_FFMPEG #endif //EXPERIMENTAL_OD_FFMPEG
#endif //USE_FFMPEG #endif //USE_FFMPEG