Audacity 3.2.0
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}
const FFmpegFunctions & mFFmpeg

◆ ~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}
AVPacket * mAVPacket
void(* av_packet_unref)(AVPacket *pkt)
void(* av_packet_free)(AVPacket **pkt)
void(* av_free)(void *ptr)

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

◆ GetDecompressionTimestamp()

virtual int64_t AVPacketWrapper::GetDecompressionTimestamp ( ) const
pure virtualnoexcept

Referenced by FFmpegExporter::WritePacket().

Here is the caller graph for this function:

◆ GetDuration()

virtual int AVPacketWrapper::GetDuration ( ) const
pure virtualnoexcept

Referenced by FFmpegExporter::WritePacket().

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 FFmpegImportFileHandle::WriteData(), and FFmpegExporter::WritePacket().

Here is the caller graph for this function:

◆ GetSize()

virtual int AVPacketWrapper::GetSize ( ) const
pure virtualnoexcept

◆ 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(), FFmpegExporter::EncodeAudio(), and FFmpegExporter::WritePacket().

Here is the caller graph for this function:

◆ OffsetPacket()

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

◆ 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 FFmpegExporter::WritePacket().

Here is the caller graph for this function:

◆ RescaleDuration()

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

Referenced by FFmpegExporter::WritePacket().

Here is the caller graph for this function:

◆ RescalePresentationTimestamp()

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

Referenced by FFmpegExporter::WritePacket().

Here is the caller graph for this function:

◆ ResetData()

virtual void AVPacketWrapper::ResetData ( )
pure virtualnoexcept

Referenced by FFmpegExporter::EncodeAudio().

Here is the caller graph for this function:

◆ ResetTimestamps()

virtual void AVPacketWrapper::ResetTimestamps ( )
pure virtualnoexcept

Referenced by FFmpegExporter::EncodeAudio().

Here is the caller graph for this function:

◆ SetStreamIndex()

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

Referenced by FFmpegExporter::EncodeAudio().

Here is the caller graph for this function:

Member Data Documentation

◆ mAVPacket

AVPacket* AVPacketWrapper::mAVPacket { nullptr }
protected

Definition at line 66 of file AVPacketWrapper.h.

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

◆ mFFmpeg

const FFmpegFunctions& AVPacketWrapper::mFFmpeg
protected

Definition at line 65 of file AVPacketWrapper.h.

Referenced by ~AVPacketWrapper().

◆ mUseAVFree

bool AVPacketWrapper::mUseAVFree { true }
protected

Definition at line 68 of file AVPacketWrapper.h.

Referenced by ~AVPacketWrapper().


The documentation for this class was generated from the following files: