Audacity  3.0.3
Public Member Functions | Private Member Functions | List of all members
AVPacketEx Struct Reference

#include <FFmpeg.h>

Inheritance diagram for AVPacketEx:
[legend]
Collaboration diagram for AVPacketEx:
[legend]

Public Member Functions

 AVPacketEx ()
 
 AVPacketEx (const AVPacketEx &) PROHIBITED
 
AVPacketExoperator= (const AVPacketEx &) PROHIBITED
 
 AVPacketEx (AVPacketEx &&that)
 
AVPacketExoperator= (AVPacketEx &&that)
 
 ~AVPacketEx ()
 
void reset ()
 

Private Member Functions

void steal (AVPacketEx &&that)
 

Detailed Description

Definition at line 883 of file FFmpeg.h.

Constructor & Destructor Documentation

◆ AVPacketEx() [1/3]

AVPacketEx::AVPacketEx ( )
inline

Definition at line 885 of file FFmpeg.h.

886  {
887  av_init_packet(this);
888  data = nullptr;
889  size = 0;
890  }

◆ AVPacketEx() [2/3]

AVPacketEx::AVPacketEx ( const AVPacketEx )

◆ AVPacketEx() [3/3]

AVPacketEx::AVPacketEx ( AVPacketEx &&  that)
inline

Definition at line 893 of file FFmpeg.h.

894  {
895  steal(std::move(that));
896  }

References steal().

Here is the call graph for this function:

◆ ~AVPacketEx()

AVPacketEx::~AVPacketEx ( )
inline

Definition at line 906 of file FFmpeg.h.

907  {
908  reset();
909  }

References reset().

Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

AVPacketEx& AVPacketEx::operator= ( AVPacketEx &&  that)
inline

Definition at line 897 of file FFmpeg.h.

898  {
899  if (this != &that) {
900  reset();
901  steal(std::move(that));
902  }
903  return *this;
904  }

References reset(), and steal().

Here is the call graph for this function:

◆ operator=() [2/2]

AVPacketEx& AVPacketEx::operator= ( const AVPacketEx )

◆ reset()

void AVPacketEx::reset ( )
inline

Definition at line 911 of file FFmpeg.h.

912  {
913  // This does not deallocate the pointer, but it frees side data.
914  av_free_packet(this);
915  }

Referenced by operator=(), and ~AVPacketEx().

Here is the caller graph for this function:

◆ steal()

void AVPacketEx::steal ( AVPacketEx &&  that)
inlineprivate

Definition at line 918 of file FFmpeg.h.

919  {
920  memcpy(this, &that, sizeof(that));
921  av_init_packet(&that);
922  that.data = nullptr;
923  that.size = 0;
924  }

Referenced by AVPacketEx(), and operator=().

Here is the caller graph for this function:

The documentation for this struct was generated from the following file:
AVPacketEx::reset
void reset()
Definition: FFmpeg.h:911
AVPacketEx::steal
void steal(AVPacketEx &&that)
Definition: FFmpeg.h:918