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

#include <FFmpeg.h>

Inheritance diagram for AVPacketEx:

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 908 of file FFmpeg.h.

Constructor & Destructor Documentation

AVPacketEx::AVPacketEx ( )
inline

Definition at line 910 of file FFmpeg.h.

911  {
912  av_init_packet(this);
913  data = nullptr;
914  size = 0;
915  }
AVPacketEx::AVPacketEx ( const AVPacketEx )
AVPacketEx::AVPacketEx ( AVPacketEx &&  that)
inline

Definition at line 918 of file FFmpeg.h.

References steal().

919  {
920  steal(std::move(that));
921  }
void steal(AVPacketEx &&that)
Definition: FFmpeg.h:943
AVPacketEx::~AVPacketEx ( )
inline

Definition at line 931 of file FFmpeg.h.

References reset().

932  {
933  reset();
934  }
void reset()
Definition: FFmpeg.h:936

Member Function Documentation

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

Definition at line 922 of file FFmpeg.h.

References reset(), and steal().

923  {
924  if (this != &that) {
925  reset();
926  steal(std::move(that));
927  }
928  return *this;
929  }
void reset()
Definition: FFmpeg.h:936
void steal(AVPacketEx &&that)
Definition: FFmpeg.h:943
void AVPacketEx::reset ( )
inline

Definition at line 936 of file FFmpeg.h.

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

937  {
938  // This does not deallocate the pointer, but it frees side data.
939  av_free_packet(this);
940  }
void AVPacketEx::steal ( AVPacketEx &&  that)
inlineprivate

Definition at line 943 of file FFmpeg.h.

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

944  {
945  memcpy(this, &that, sizeof(that));
946  av_init_packet(&that);
947  that.data = nullptr;
948  that.size = 0;
949  }

The documentation for this struct was generated from the following file: