mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-29 16:31:12 +02:00
libeplayer3: cleanup AVFormatContext propagation to writers
This commit is contained in:
@@ -35,11 +35,11 @@
|
||||
class WriterAC3 : public Writer
|
||||
{
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
WriterAC3();
|
||||
};
|
||||
|
||||
bool WriterAC3::Write(int fd, AVFormatContext * /* avfc */, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
bool WriterAC3::Write(int fd, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -38,7 +38,7 @@ class WriterDIVX : public Writer
|
||||
private:
|
||||
bool initialHeader;
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
void Init();
|
||||
WriterDIVX();
|
||||
};
|
||||
@@ -48,7 +48,7 @@ void WriterDIVX::Init()
|
||||
initialHeader = true;
|
||||
}
|
||||
|
||||
bool WriterDIVX::Write(int fd, AVFormatContext * /* avfc */, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
bool WriterDIVX::Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -36,11 +36,11 @@
|
||||
class WriterDTS : public Writer
|
||||
{
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
WriterDTS();
|
||||
};
|
||||
|
||||
bool WriterDTS::Write(int fd, AVFormatContext * /* avfc */, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
bool WriterDTS::Write(int fd, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -32,11 +32,11 @@
|
||||
class WriterH263 : public Writer
|
||||
{
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
WriterH263();
|
||||
};
|
||||
|
||||
bool WriterH263::Write(int fd, AVFormatContext * /* avfc */, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
bool WriterH263::Write(int fd, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -53,7 +53,7 @@ class WriterH264 : public Writer
|
||||
bool initialHeader;
|
||||
unsigned int NalLengthBytes;
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
void Init();
|
||||
WriterH264();
|
||||
};
|
||||
@@ -64,7 +64,7 @@ void WriterH264::Init(void)
|
||||
NalLengthBytes = 1;
|
||||
}
|
||||
|
||||
bool WriterH264::Write(int fd, AVFormatContext * /* avfc */, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
bool WriterH264::Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -35,11 +35,11 @@
|
||||
class WriterMP3 : public Writer
|
||||
{
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
WriterMP3();
|
||||
};
|
||||
|
||||
bool WriterMP3::Write(int fd, AVFormatContext * /* avfc */, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
bool WriterMP3::Write(int fd, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -35,11 +35,11 @@
|
||||
class WriterMPEG2 : public Writer
|
||||
{
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
WriterMPEG2();
|
||||
};
|
||||
|
||||
bool WriterMPEG2::Write(int fd, AVFormatContext * /* avfc */, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
bool WriterMPEG2::Write(int fd, AVStream * /* stream */, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -80,7 +80,7 @@ class WriterPCM : public Writer
|
||||
bool restart_audio_resampling;
|
||||
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool prepareClipPlay();
|
||||
bool writePCM(int fd, int64_t Pts, uint8_t *data, unsigned int size);
|
||||
void Init();
|
||||
@@ -225,7 +225,7 @@ void WriterPCM::Init()
|
||||
restart_audio_resampling = true;
|
||||
}
|
||||
|
||||
bool WriterPCM::Write(int fd, AVFormatContext * /*avfc*/, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
bool WriterPCM::Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0)
|
||||
return false;
|
||||
|
@@ -51,7 +51,7 @@ class WriterVC1 : public Writer
|
||||
bool initialHeader;
|
||||
uint8_t FrameHeaderSeen;
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
void Init();
|
||||
WriterVC1();
|
||||
};
|
||||
@@ -61,7 +61,7 @@ void WriterVC1::Init()
|
||||
initialHeader = true;
|
||||
}
|
||||
|
||||
bool WriterVC1::Write(int fd, AVFormatContext * /* avfc */, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
bool WriterVC1::Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -58,7 +58,7 @@ class WriterWMV : public Writer
|
||||
private:
|
||||
bool initialHeader;
|
||||
public:
|
||||
bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
bool Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts);
|
||||
void Init();
|
||||
WriterWMV();
|
||||
};
|
||||
@@ -68,7 +68,7 @@ void WriterWMV::Init()
|
||||
initialHeader = true;
|
||||
}
|
||||
|
||||
bool WriterWMV::Write(int fd, AVFormatContext * /* avfc */, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
bool WriterWMV::Write(int fd, AVStream *stream, AVPacket *packet, int64_t pts)
|
||||
{
|
||||
if (fd < 0 || !packet || !packet->data)
|
||||
return false;
|
||||
|
@@ -58,7 +58,7 @@ void Writer::Register(Writer *w, enum AVCodecID id, audio_encoding_t encoding)
|
||||
aencoding[id] = encoding;
|
||||
}
|
||||
|
||||
bool Writer::Write(int /* fd */, AVFormatContext * /* avfc */, AVStream * /*stream*/, AVPacket * /* packet */, int64_t /* pts */)
|
||||
bool Writer::Write(int /* fd */, AVStream * /*stream*/, AVPacket * /* packet */, int64_t /* pts */)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user