Audacity  3.0.3
Public Member Functions | Protected Attributes | List of all members
AVPacketWrapper Class Referenceabstract

#include <AVPacketWrapper.h>

Collaboration diagram for AVPacketWrapper:
[legend]

Public Member Functions

 AVPacketWrapper (const AVPacketWrapper &)=delete
 
AVPacketWrapperoperator= (AVPacketWrapper &)=delete
 
 AVPacketWrapper (AVPacketWrapper &&)=delete
 
AVPacketWrapperoperator= (AVPacketWrapper &&)=delete
 
 AVPacketWrapper (const FFmpegFunctions &ffmpeg) noexcept
 
AVPacketGetWrappedValue () noexcept
 
const AVPacketGetWrappedValue () const noexcept
 
virtual ~AVPacketWrapper ()
 
virtual AudacityAVBufferRefGetBuf () const noexcept=0
 
virtual int64_t GetPresentationTimestamp () const noexcept=0
 
virtual int64_t GetDecompressionTimestamp () const noexcept=0
 
virtual int GetDuration () const noexcept=0
 
virtual void RescalePresentationTimestamp (AudacityAVRational bq, AudacityAVRational cq) noexcept=0
 
virtual void RescaleDecompressionTimestamp (AudacityAVRational bq, AudacityAVRational cq) noexcept=0
 
virtual void RescaleDuration (AudacityAVRational bq, AudacityAVRational cq) noexcept=0
 
virtual uint8_t * GetData () const noexcept=0
 
virtual int GetSize () const noexcept=0
 
virtual bool OffsetPacket (size_t offset) noexcept=0
 
virtual void ResetData () noexcept=0
 
virtual void ResetTimestamps () noexcept=0
 
virtual int GetStreamIndex () const noexcept=0
 
virtual void SetStreamIndex (int index) noexcept=0
 
virtual int GetFlags () const noexcept=0
 
virtual int64_t GetPos () const noexcept=0
 
virtual int64_t GetConvergenceDuration () const noexcept=0
 
virtual std::unique_ptr< AVPacketWrapperClone () const noexcept=0
 

Protected Attributes

const FFmpegFunctionsmFFmpeg
 
AVPacketmAVPacket { nullptr }
 
bool mUseAVFree { true }
 

Detailed Description

Definition at line 20 of file AVPacketWrapper.h.

Constructor & Destructor Documentation

◆ AVPacketWrapper() [1/3]

AVPacketWrapper::AVPacketWrapper ( const AVPacketWrapper )
delete

◆ AVPacketWrapper() [2/3]

AVPacketWrapper::AVPacketWrapper ( AVPacketWrapper &&  )
delete

◆ AVPacketWrapper() [3/3]

AVPacketWrapper::AVPacketWrapper ( const FFmpegFunctions ffmpeg)
explicitnoexcept

Definition at line 15 of file AVPacketWrapper.cpp.

16  : mFFmpeg(ffmpeg)
17 {
18 }

◆ ~AVPacketWrapper()

AVPacketWrapper::~AVPacketWrapper ( )
virtual

Definition at line 30 of file AVPacketWrapper.cpp.

31 {
32  if (mAVPacket != nullptr)
33  {
34  if (!mUseAVFree)
35  {
37  }
38  else
39  {
42  }
43  }
44 }

References AVUtilFunctions::av_free, AVCodecFunctions::av_packet_free, AVCodecFunctions::av_packet_unref, mAVPacket, mFFmpeg, and mUseAVFree.

Member Function Documentation

◆ Clone()

virtual std::unique_ptr<AVPacketWrapper> AVPacketWrapper::Clone ( ) const
pure virtualnoexcept
Postcondition
return value is not null

Referenced by AVCodecContextWrapper::DecodeAudioPacket().

Here is the caller graph for this function:

◆ GetBuf()

virtual AudacityAVBufferRef* AVPacketWrapper::GetBuf ( ) const
pure virtualnoexcept

◆ GetConvergenceDuration()

virtual int64_t AVPacketWrapper::GetConvergenceDuration ( ) const
pure virtualnoexcept

◆ GetData()

virtual uint8_t* AVPacketWrapper::GetData ( ) const
pure virtualnoexcept

Referenced by AVCodecContextWrapper::DecodeAudioPacket().

Here is the caller graph for this function:

◆ GetDecompressionTimestamp()

virtual int64_t AVPacketWrapper::GetDecompressionTimestamp ( ) const
pure virtualnoexcept

Referenced by ExportFFmpeg::EncodeAudioFrame(), and ExportFFmpeg::Finalize().

Here is the caller graph for this function:

◆ GetDuration()

virtual int AVPacketWrapper::GetDuration ( ) const
pure virtualnoexcept

Referenced by ExportFFmpeg::Finalize().

Here is the caller graph for this function:

◆ GetFlags()

virtual int AVPacketWrapper::GetFlags ( ) const
pure virtualnoexcept

◆ GetPos()

virtual int64_t AVPacketWrapper::GetPos ( ) const
pure virtualnoexcept

Referenced by FFmpegImportFileHandle::WriteData().

Here is the caller graph for this function:

◆ GetPresentationTimestamp()

virtual int64_t AVPacketWrapper::GetPresentationTimestamp ( ) const
pure virtualnoexcept

Referenced by ExportFFmpeg::EncodeAudioFrame(), ExportFFmpeg::Finalize(), and FFmpegImportFileHandle::WriteData().

Here is the caller graph for this function:

◆ GetSize()

virtual int AVPacketWrapper::GetSize ( ) const
pure virtualnoexcept

Referenced by AVCodecContextWrapper::DecodeAudioPacket().

Here is the caller graph for this function:

◆ GetStreamIndex()

virtual int AVPacketWrapper::GetStreamIndex ( ) const
pure virtualnoexcept

◆ GetWrappedValue() [1/2]

const AVPacket * AVPacketWrapper::GetWrappedValue ( ) const
noexcept

Definition at line 25 of file AVPacketWrapper.cpp.

26 {
27  return mAVPacket;
28 }

References mAVPacket.

◆ GetWrappedValue() [2/2]

AVPacket * AVPacketWrapper::GetWrappedValue ( )
noexcept

Definition at line 20 of file AVPacketWrapper.cpp.

21 {
22  return mAVPacket;
23 }

References mAVPacket.

Referenced by AVCodecContextWrapper::DecodeAudioPacket(), encode_audio(), ExportFFmpeg::EncodeAudioFrame(), ExportFFmpeg::Finalize(), and AVFormatContextWrapper::ReadNextPacket().

Here is the caller graph for this function:

◆ OffsetPacket()

virtual bool AVPacketWrapper::OffsetPacket ( size_t  offset)
pure virtualnoexcept

Referenced by AVCodecContextWrapper::DecodeAudioPacket().

Here is the caller graph for this function:

◆ operator=() [1/2]

AVPacketWrapper& AVPacketWrapper::operator= ( AVPacketWrapper &&  )
delete

◆ operator=() [2/2]

AVPacketWrapper& AVPacketWrapper::operator= ( AVPacketWrapper )
delete

◆ RescaleDecompressionTimestamp()

virtual void AVPacketWrapper::RescaleDecompressionTimestamp ( AudacityAVRational  bq,
AudacityAVRational  cq 
)
pure virtualnoexcept

Referenced by ExportFFmpeg::EncodeAudioFrame(), and ExportFFmpeg::Finalize().

Here is the caller graph for this function:

◆ RescaleDuration()

virtual void AVPacketWrapper::RescaleDuration ( AudacityAVRational  bq,
AudacityAVRational  cq 
)
pure virtualnoexcept

Referenced by ExportFFmpeg::Finalize().

Here is the caller graph for this function:

◆ RescalePresentationTimestamp()

virtual void AVPacketWrapper::RescalePresentationTimestamp ( AudacityAVRational  bq,
AudacityAVRational  cq 
)
pure virtualnoexcept

Referenced by ExportFFmpeg::EncodeAudioFrame(), and ExportFFmpeg::Finalize().

Here is the caller graph for this function:

◆ ResetData()

virtual void AVPacketWrapper::ResetData ( )
pure virtualnoexcept

Referenced by encode_audio().

Here is the caller graph for this function:

◆ ResetTimestamps()

virtual void AVPacketWrapper::ResetTimestamps ( )
pure virtualnoexcept

Referenced by encode_audio().

Here is the caller graph for this function:

◆ SetStreamIndex()

virtual void AVPacketWrapper::SetStreamIndex ( int  index)
pure virtualnoexcept

Referenced by ExportFFmpeg::EncodeAudioFrame(), and ExportFFmpeg::Finalize().

Here is the caller graph for this function:

Member Data Documentation

◆ mAVPacket

AVPacket* AVPacketWrapper::mAVPacket { nullptr }
protected

Definition at line 65 of file AVPacketWrapper.h.

Referenced by GetWrappedValue(), and ~AVPacketWrapper().

◆ mFFmpeg

const FFmpegFunctions& AVPacketWrapper::mFFmpeg
protected

Definition at line 64 of file AVPacketWrapper.h.

Referenced by ~AVPacketWrapper().

◆ mUseAVFree

bool AVPacketWrapper::mUseAVFree { true }
protected

Definition at line 67 of file AVPacketWrapper.h.

Referenced by ~AVPacketWrapper().


The documentation for this class was generated from the following files:
AVPacketWrapper::mAVPacket
AVPacket * mAVPacket
Definition: AVPacketWrapper.h:65
AVCodecFunctions::av_packet_unref
void(* av_packet_unref)(AVPacket *pkt)
Definition: AVCodecFunctions.h:22
AVPacketWrapper::mUseAVFree
bool mUseAVFree
Definition: AVPacketWrapper.h:67
AVPacketWrapper::mFFmpeg
const FFmpegFunctions & mFFmpeg
Definition: AVPacketWrapper.h:64
AVUtilFunctions::av_free
void(* av_free)(void *ptr)
Definition: AVUtilFunctions.h:23
AVCodecFunctions::av_packet_free
void(* av_packet_free)(AVPacket **pkt)
Definition: AVCodecFunctions.h:42