libeplayer3/writer: remove constructors/destructors from writer class

This commit is contained in:
martii
2014-04-26 14:57:22 +02:00
parent 8199257e8c
commit ad8620e76a
5 changed files with 4 additions and 3 deletions

View File

@@ -48,8 +48,5 @@ class Writer
virtual void Init(void) { } virtual void Init(void) { }
virtual bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts); virtual bool Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t pts);
Writer() { Init (); }
~Writer() {}
}; };
#endif #endif

View File

@@ -101,6 +101,7 @@ WriterDIVX::WriterDIVX()
Register(this, AV_CODEC_ID_MSMPEG4V1, VIDEO_ENCODING_MPEG4P2); Register(this, AV_CODEC_ID_MSMPEG4V1, VIDEO_ENCODING_MPEG4P2);
Register(this, AV_CODEC_ID_MSMPEG4V2, VIDEO_ENCODING_MPEG4P2); Register(this, AV_CODEC_ID_MSMPEG4V2, VIDEO_ENCODING_MPEG4P2);
Register(this, AV_CODEC_ID_MSMPEG4V3, VIDEO_ENCODING_MPEG4P2); Register(this, AV_CODEC_ID_MSMPEG4V3, VIDEO_ENCODING_MPEG4P2);
Init();
} }
static WriterDIVX writer_divx __attribute__ ((init_priority (300))); static WriterDIVX writer_divx __attribute__ ((init_priority (300)));

View File

@@ -249,6 +249,7 @@ bool WriterH264::Write(int fd, AVFormatContext * /* avfc */, AVStream *stream, A
WriterH264::WriterH264() WriterH264::WriterH264()
{ {
Register(this, AV_CODEC_ID_H264, VIDEO_ENCODING_H264); Register(this, AV_CODEC_ID_H264, VIDEO_ENCODING_H264);
Init();
} }
static WriterH264 writerh264 __attribute__ ((init_priority (300))); static WriterH264 writerh264 __attribute__ ((init_priority (300)));

View File

@@ -181,6 +181,7 @@ bool WriterVC1::Write(int fd, AVFormatContext * /* avfc */, AVStream *stream, AV
WriterVC1::WriterVC1() WriterVC1::WriterVC1()
{ {
Register(this, AV_CODEC_ID_VC1, VIDEO_ENCODING_VC1); Register(this, AV_CODEC_ID_VC1, VIDEO_ENCODING_VC1);
Init();
} }
static WriterVC1 writer_vc1 __attribute__ ((init_priority (300))); static WriterVC1 writer_vc1 __attribute__ ((init_priority (300)));

View File

@@ -164,6 +164,7 @@ WriterWMV::WriterWMV()
Register(this, AV_CODEC_ID_WMV1, VIDEO_ENCODING_WMV); Register(this, AV_CODEC_ID_WMV1, VIDEO_ENCODING_WMV);
Register(this, AV_CODEC_ID_WMV2, VIDEO_ENCODING_WMV); Register(this, AV_CODEC_ID_WMV2, VIDEO_ENCODING_WMV);
Register(this, AV_CODEC_ID_WMV3, VIDEO_ENCODING_WMV); Register(this, AV_CODEC_ID_WMV3, VIDEO_ENCODING_WMV);
Init();
} }
static WriterWMV writer_wmv __attribute__ ((init_priority (300))); static WriterWMV writer_wmv __attribute__ ((init_priority (300)));