Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 443206
Collapse All | Expand All

(-)plugins/video/common/dyna.cxx (-6 / +7 lines)
Lines 37-42 Link Here
37
 *                 Craig Southeren (craigs@postincrement.com)
37
 *                 Craig Southeren (craigs@postincrement.com)
38
 *                 Matthias Schneider (ma30002000@yahoo.de)
38
 *                 Matthias Schneider (ma30002000@yahoo.de)
39
 */
39
 */
40
#include <stdio.h>
40
#include "dyna.h"
41
#include "dyna.h"
41
42
42
bool DynaLink::Open(const char *name)
43
bool DynaLink::Open(const char *name)
Lines 210-223 Link Here
210
#endif
211
#endif
211
212
212
213
213
FFMPEGLibrary::FFMPEGLibrary(CodecID codec)
214
FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)
214
{
215
{
215
  m_codec = codec;
216
  m_codec = codec;
216
  if (m_codec==CODEC_ID_H264)
217
  if (m_codec==AV_CODEC_ID_H264)
217
      snprintf( m_codecString, sizeof(m_codecString), "H264");
218
      snprintf( m_codecString, sizeof(m_codecString), "H264");
218
  if (m_codec==CODEC_ID_H263P)
219
  if (m_codec==AV_CODEC_ID_H263P)
219
      snprintf( m_codecString, sizeof(m_codecString), "H263+");
220
      snprintf( m_codecString, sizeof(m_codecString), "H263+");
220
  if (m_codec==CODEC_ID_MPEG4)
221
  if (m_codec==AV_CODEC_ID_MPEG4)
221
      snprintf( m_codecString, sizeof(m_codecString), "MPEG4");
222
      snprintf( m_codecString, sizeof(m_codecString), "MPEG4");
222
  m_isLoadedOK = false;
223
  m_isLoadedOK = false;
223
}
224
}
Lines 348-359 Link Here
348
  return true;
349
  return true;
349
}
350
}
350
351
351
AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
352
AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)
352
{
353
{
353
  return Favcodec_find_encoder(id);
354
  return Favcodec_find_encoder(id);
354
}
355
}
355
356
356
AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
357
AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)
357
{
358
{
358
  WaitAndSignal m(processLock);
359
  WaitAndSignal m(processLock);
359
360
(-)plugins/video/common/dyna.h (-6 / +6 lines)
Lines 88-100 Link Here
88
class FFMPEGLibrary 
88
class FFMPEGLibrary 
89
{
89
{
90
  public:
90
  public:
91
    FFMPEGLibrary(CodecID codec);
91
    FFMPEGLibrary(AVCodecID codec);
92
    ~FFMPEGLibrary();
92
    ~FFMPEGLibrary();
93
93
94
    bool Load();
94
    bool Load();
95
95
96
    AVCodec *AvcodecFindEncoder(enum CodecID id);
96
    AVCodec *AvcodecFindEncoder(enum AVCodecID id);
97
    AVCodec *AvcodecFindDecoder(enum CodecID id);
97
    AVCodec *AvcodecFindDecoder(enum AVCodecID id);
98
    AVCodecContext *AvcodecAllocContext(void);
98
    AVCodecContext *AvcodecAllocContext(void);
99
    AVFrame *AvcodecAllocFrame(void);
99
    AVFrame *AvcodecAllocFrame(void);
100
    int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
100
    int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
Lines 117-131 Link Here
117
    DynaLink m_libAvcodec;
117
    DynaLink m_libAvcodec;
118
    DynaLink m_libAvutil;
118
    DynaLink m_libAvutil;
119
119
120
    CodecID m_codec;
120
    AVCodecID m_codec;
121
    char m_codecString[32];
121
    char m_codecString[32];
122
122
123
    void (*Favcodec_init)(void);
123
    void (*Favcodec_init)(void);
124
    void (*Fav_init_packet)(AVPacket *pkt);
124
    void (*Fav_init_packet)(AVPacket *pkt);
125
125
126
    void (*Favcodec_register_all)(void);
126
    void (*Favcodec_register_all)(void);
127
    AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
127
    AVCodec *(*Favcodec_find_encoder)(enum AVCodecID id);
128
    AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
128
    AVCodec *(*Favcodec_find_decoder)(enum AVCodecID id);
129
    AVCodecContext *(*Favcodec_alloc_context)(void);
129
    AVCodecContext *(*Favcodec_alloc_context)(void);
130
    AVFrame *(*Favcodec_alloc_frame)(void);
130
    AVFrame *(*Favcodec_alloc_frame)(void);
131
    int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec);
131
    int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec);
(-)plugins/video/H.263-1998/h263-1998.cxx (-5 / +11 lines)
Lines 43-48 Link Here
43
 * $Date: 2012-10-02 00:34:04 -0500 (Tue, 02 Oct 2012) $
43
 * $Date: 2012-10-02 00:34:04 -0500 (Tue, 02 Oct 2012) $
44
 */
44
 */
45
45
46
#define CODEC_FLAG_H263P_UMV      0x02000000
47
#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
48
#define CODEC_FLAG_H263P_AIV      0x00000008
49
#define CODEC_FLAG_OBMC           0x00000001
50
#define FF_I_TYPE  1
51
46
#ifndef PLUGIN_CODEC_DLL_EXPORTS
52
#ifndef PLUGIN_CODEC_DLL_EXPORTS
47
#include "plugin-config.h"
53
#include "plugin-config.h"
48
#endif
54
#endif
Lines 94-100 Link Here
94
  { CIF16_WIDTH, CIF16_HEIGHT, PLUGINCODEC_CIF16_MPI },
100
  { CIF16_WIDTH, CIF16_HEIGHT, PLUGINCODEC_CIF16_MPI },
95
};
101
};
96
102
97
static FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H263P);
103
static FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H263P);
98
104
99
105
100
/////////////////////////////////////////////////////////////////////////////
106
/////////////////////////////////////////////////////////////////////////////
Lines 203-209 Link Here
203
  PTRACE(4, m_prefix, "Encoder closed");
209
  PTRACE(4, m_prefix, "Encoder closed");
204
}
210
}
205
211
206
bool H263_Base_EncoderContext::Init(CodecID codecId)
212
bool H263_Base_EncoderContext::Init(AVCodecID codecId)
207
{
213
{
208
  PTRACE(5, m_prefix, "Opening encoder");
214
  PTRACE(5, m_prefix, "Opening encoder");
209
215
Lines 616-622 Link Here
616
622
617
bool H263_RFC2190_EncoderContext::Init()
623
bool H263_RFC2190_EncoderContext::Init()
618
{
624
{
619
  if (!H263_Base_EncoderContext::Init(CODEC_ID_H263))
625
  if (!H263_Base_EncoderContext::Init(AV_CODEC_ID_H263))
620
    return false;
626
    return false;
621
627
622
#if LIBAVCODEC_RTP_MODE
628
#if LIBAVCODEC_RTP_MODE
Lines 661-667 Link Here
661
667
662
bool H263_RFC2429_EncoderContext::Init()
668
bool H263_RFC2429_EncoderContext::Init()
663
{
669
{
664
  return H263_Base_EncoderContext::Init(CODEC_ID_H263P);
670
  return H263_Base_EncoderContext::Init(AV_CODEC_ID_H263P);
665
}
671
}
666
672
667
673
Lines 685-691 Link Here
685
  if (!FFMPEGLibraryInstance.Load())
691
  if (!FFMPEGLibraryInstance.Load())
686
    return;
692
    return;
687
693
688
  if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H263)) == NULL) {
694
  if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H263)) == NULL) {
689
    PTRACE(1, m_prefix, "Codec not found for decoder");
695
    PTRACE(1, m_prefix, "Codec not found for decoder");
690
    return;
696
    return;
691
  }
697
  }
(-)plugins/video/H.263-1998/h263-1998.h (-1 / +1 lines)
Lines 115-121 Link Here
115
    virtual ~H263_Base_EncoderContext();
115
    virtual ~H263_Base_EncoderContext();
116
116
117
    virtual bool Init() = 0;
117
    virtual bool Init() = 0;
118
    virtual bool Init(CodecID codecId);
118
    virtual bool Init(AVCodecID codecId);
119
119
120
    virtual bool SetOptions(const char * const * options);
120
    virtual bool SetOptions(const char * const * options);
121
    virtual void SetOption(const char * option, const char * value);
121
    virtual void SetOption(const char * option, const char * value);
(-)plugins/video/H.263-1998/Makefile.in (-1 / +1 lines)
Lines 34-40 Link Here
34
             $(COMMONDIR)/mpi.cxx \
34
             $(COMMONDIR)/mpi.cxx \
35
             $(COMMONDIR)/dyna.cxx
35
             $(COMMONDIR)/dyna.cxx
36
36
37
CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
37
CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) -fpermissive
38
LIBS   += @DL_LIBS@
38
LIBS   += @DL_LIBS@
39
39
40
HAVE_LIBAVCODEC_RTP_MODE=@HAVE_LIBAVCODEC_RTP_MODE@
40
HAVE_LIBAVCODEC_RTP_MODE=@HAVE_LIBAVCODEC_RTP_MODE@
(-)plugins/video/H.264/h264-x264.cxx (-3 / +12 lines)
Lines 36-41 Link Here
36
 * $Date: 2012-07-17 22:41:57 -0500 (Tue, 17 Jul 2012) $
36
 * $Date: 2012-07-17 22:41:57 -0500 (Tue, 17 Jul 2012) $
37
 */
37
 */
38
38
39
#define FF_ER_AGGRESSIVE      3
40
#define CODEC_FLAG2_BRDO          0x00000400 
41
#define CODEC_FLAG2_MEMC_ONLY     0x00001000
42
#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
43
#define CODEC_FLAG2_SKIP_RD       0x00004000 ///< RD optimal MB level residual skipping
44
#define FF_IDCT_H264          11
45
46
#include <stdio.h>
47
39
#ifndef PLUGIN_CODEC_DLL_EXPORTS
48
#ifndef PLUGIN_CODEC_DLL_EXPORTS
40
#include "plugin-config.h"
49
#include "plugin-config.h"
41
#endif
50
#endif
Lines 104-110 Link Here
104
113
105
///////////////////////////////////////////////////////////////////////////////
114
///////////////////////////////////////////////////////////////////////////////
106
115
107
FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H264);
116
FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H264);
108
117
109
PLUGINCODEC_CONTROL_LOG_FUNCTION_DEF
118
PLUGINCODEC_CONTROL_LOG_FUNCTION_DEF
110
119
Lines 1064-1070 Link Here
1064
         allows you to fail the create operation (return false), which cannot
1073
         allows you to fail the create operation (return false), which cannot
1065
         be done in the normal C++ constructor. */
1074
         be done in the normal C++ constructor. */
1066
1075
1067
      if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H264)) == NULL)
1076
      if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H264)) == NULL)
1068
        return false;
1077
        return false;
1069
1078
1070
      if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext()) == NULL)
1079
      if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext()) == NULL)
Lines 1072-1078 Link Here
1072
1081
1073
      m_context->workaround_bugs = FF_BUG_AUTODETECT;
1082
      m_context->workaround_bugs = FF_BUG_AUTODETECT;
1074
#ifdef FF_ER_AGGRESSIVE
1083
#ifdef FF_ER_AGGRESSIVE
1075
      m_context->error_recognition = FF_ER_AGGRESSIVE;
1084
      m_context->err_recognition = FF_ER_AGGRESSIVE;
1076
#endif
1085
#endif
1077
      m_context->idct_algo = FF_IDCT_H264;
1086
      m_context->idct_algo = FF_IDCT_H264;
1078
      m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
1087
      m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
1079
1088
(-)plugins/video/MPEG4-ffmpeg/mpeg4.cxx (-3 / +8 lines)
Lines 53-58 Link Here
53
53
54
 */
54
 */
55
55
56
#define CODEC_FLAG_H263P_UMV      0x02000000
57
#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
58
#define FF_I_TYPE  1
59
#define CODEC_FLAG_PART   0x0080
60
56
// Plugin specific
61
// Plugin specific
57
#define _CRT_SECURE_NO_DEPRECATE
62
#define _CRT_SECURE_NO_DEPRECATE
58
63
Lines 205-211 Link Here
205
    { 0 }
210
    { 0 }
206
};
211
};
207
212
208
FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_MPEG4);
213
FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_MPEG4);
209
214
210
215
211
static bool mpeg4IsIframe (BYTE * frameBuffer, unsigned int frameLen )
216
static bool mpeg4IsIframe (BYTE * frameBuffer, unsigned int frameLen )
Lines 701-707 Link Here
701
    return false;
706
    return false;
702
  }
707
  }
703
708
704
  if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){
709
  if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(AV_CODEC_ID_MPEG4)) == NULL){
705
    PTRACE(1, "MPEG4", "Encoder not found");
710
    PTRACE(1, "MPEG4", "Encoder not found");
706
    return false;
711
    return false;
707
  }
712
  }
Lines 1391-1397 Link Here
1391
1396
1392
bool MPEG4DecoderContext::OpenCodec()
1397
bool MPEG4DecoderContext::OpenCodec()
1393
{
1398
{
1394
    if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_MPEG4)) == NULL) {
1399
    if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_MPEG4)) == NULL) {
1395
        PTRACE(1, "MPEG4", "Decoder not found for encoder");
1400
        PTRACE(1, "MPEG4", "Decoder not found for encoder");
1396
        return false;
1401
        return false;
1397
    }
1402
    }
(-)plugins/video/MPEG4-ffmpeg/Makefile.in (-1 / +1 lines)
Lines 30-36 Link Here
30
SRCDIR    := .
30
SRCDIR    := .
31
SRCS      := mpeg4.cxx $(COMMONDIR)/dyna.cxx
31
SRCS      := mpeg4.cxx $(COMMONDIR)/dyna.cxx
32
32
33
CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
33
CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) -fpermissive
34
LIBS   += @DL_LIBS@
34
LIBS   += @DL_LIBS@
35
35
36
# Add LIBAVCODEC_SOURCE_DIR to the include path so we can #include <libavcodec/...h>
36
# Add LIBAVCODEC_SOURCE_DIR to the include path so we can #include <libavcodec/...h>

Return to bug 443206