mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 08:38:39 +02:00
Replace tabs by spaces.
This commit is contained in:
parent
c8d6505c64
commit
149fcafc1c
@ -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"
|
||||
|
@ -132,8 +132,8 @@ extern "C" {
|
||||
* we need for the next bit */
|
||||
#include <wx/string.h>
|
||||
#include <wx/dynlib.h>
|
||||
#include <wx/log.h> // for wxLogNull
|
||||
#include <wx/msgdlg.h> // for wxMessageBox
|
||||
#include <wx/log.h> // for wxLogNull
|
||||
#include <wx/msgdlg.h> // for wxMessageBox
|
||||
#include <wx/utils.h>
|
||||
#include "widgets/LinkingHtmlWindow.h"
|
||||
#include "FileDialog.h"
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#include "../Audacity.h" // needed before FFmpeg.h
|
||||
#include "../Audacity.h" // needed before FFmpeg.h
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
// 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user