MythTV  master
mythavformatbuffer.h
Go to the documentation of this file.
1 #ifndef AVFRINGBUFFER_H
2 #define AVFRINGBUFFER_H
3 
4 // MythTV
6 
7 // FFmpeg
8 extern "C" {
9 #include "libavformat/avio.h"
10 }
11 
13 {
14  public:
15  MythAVFormatBuffer(MythMediaBuffer *Buffer, bool write_flag, bool force_seek);
17 
18  void SetInInit (bool State);
19  bool IsInInit (void) const;
20 
21  AVIOContext* getAVIOContext() { return m_avioContext; }
22 
23  private:
24  static int read_packet(void *opaque, uint8_t *buf, int buf_size);
25  static int write_packet(void *opaque, const uint8_t *buf, int buf_size);
26  static int64_t seek(void *opaque, int64_t offset, int whence);
27 
28  AVIOContext* alloc_context(bool write_flag, bool force_seek);
29 
30  MythMediaBuffer *m_buffer { nullptr };
31  bool m_initState { true };
32  AVIOContext *m_avioContext { nullptr };
33 };
34 #endif
MythAVFormatBuffer::getAVIOContext
AVIOContext * getAVIOContext()
Definition: mythavformatbuffer.h:21
MythAVFormatBuffer::read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: mythavformatbuffer.cpp:66
MythMediaBuffer
Definition: mythmediabuffer.h:59
State
State
Definition: zmserver.h:68
MythAVFormatBuffer::~MythAVFormatBuffer
~MythAVFormatBuffer()
Definition: mythavformatbuffer.cpp:23
MythAVFormatBuffer::IsInInit
bool IsInInit(void) const
Definition: mythavformatbuffer.cpp:109
MythAVFormatBuffer::write_packet
static int write_packet(void *opaque, const uint8_t *buf, int buf_size)
Definition: mythavformatbuffer.cpp:79
MythAVFormatBuffer::m_initState
bool m_initState
Definition: mythavformatbuffer.h:31
MythAVFormatBuffer::m_buffer
MythMediaBuffer * m_buffer
Definition: mythavformatbuffer.h:30
mythmediabuffer.h
Buffer
Definition: MythExternControl.h:36
MythAVFormatBuffer::seek
static int64_t seek(void *opaque, int64_t offset, int whence)
Definition: mythavformatbuffer.cpp:88
MythAVFormatBuffer::SetInInit
void SetInInit(bool State)
Definition: mythavformatbuffer.cpp:103
MythAVFormatBuffer::MythAVFormatBuffer
MythAVFormatBuffer(MythMediaBuffer *Buffer, bool write_flag, bool force_seek)
Definition: mythavformatbuffer.cpp:14
MythAVFormatBuffer::alloc_context
AVIOContext * alloc_context(bool write_flag, bool force_seek)
Definition: mythavformatbuffer.cpp:43
MythAVFormatBuffer
Definition: mythavformatbuffer.h:12
MythAVFormatBuffer::m_avioContext
AVIOContext * m_avioContext
Definition: mythavformatbuffer.h:32