Skip to content

Commit eb3f708

Browse files
author
Clement Champetier
committed
Video/Audio frames: reorder methods
"getSize" is about the data buffer.
1 parent e5ee852 commit eb3f708

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/AvTranscoder/data/decoded/AudioFrame.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class AvExport AudioFrame : public IFrame
4949
*/
5050
void allocateData();
5151
void freeData();
52+
size_t getSize() const;
5253

5354
size_t getSampleRate() const { return av_frame_get_sample_rate(_frame); }
5455
size_t getNbChannels() const { return av_frame_get_channels(_frame); }
@@ -58,8 +59,6 @@ class AvExport AudioFrame : public IFrame
5859
size_t getBytesPerSample() const; ///< 0 if unknown sample format
5960
size_t getNbSamplesPerChannel() const { return _frame->nb_samples; }
6061

61-
size_t getSize() const;
62-
6362
/**
6463
* @brief This methods dynamically updates the size that the data buffer would occupy if allocated.
6564
* @warning If the data buffer is already allocated, this could lead to memory leaks or seg fault.

src/AvTranscoder/data/decoded/VideoFrame.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,12 @@ class AvExport VideoFrame : public IFrame
5757
*/
5858
void allocateData();
5959
void freeData();
60+
size_t getSize() const;
6061

6162
size_t getWidth() const { return _frame->width; }
6263
size_t getHeight() const { return _frame->height; }
6364
AVPixelFormat getPixelFormat() const { return static_cast<AVPixelFormat>(_frame->format); }
6465

65-
size_t getSize() const;
66-
6766
void assignBuffer(const unsigned char* ptrValue);
6867

6968
private:

0 commit comments

Comments
 (0)