]> git.pld-linux.org Git - packages/opal.git/blob - ffmpeg2.patch
af29abfc8775263f85a89930d8a8c4a5f502a1b2
[packages/opal.git] / ffmpeg2.patch
1 diff -rupN a/plugins/video/common/dyna.cxx b/plugins/video/common/dyna.cxx
2 --- a/plugins/video/common/dyna.cxx     2013-02-20 02:18:05.000000000 +0000
3 +++ b/plugins/video/common/dyna.cxx     2013-07-22 16:55:47.307946942 +0000
4 @@ -210,7 +210,7 @@ static void logCallbackFFMPEG(void * avc
5  #endif
6  
7  
8 -FFMPEGLibrary::FFMPEGLibrary(CodecID codec)
9 +FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)
10  {
11    m_codec = codec;
12    if (m_codec==CODEC_ID_H264)
13 @@ -348,12 +348,12 @@ bool FFMPEGLibrary::Load()
14    return true;
15  }
16  
17 -AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
18 +AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)
19  {
20    return Favcodec_find_encoder(id);
21  }
22  
23 -AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
24 +AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)
25  {
26    WaitAndSignal m(processLock);
27  
28 diff -rupN a/plugins/video/common/dyna.h b/plugins/video/common/dyna.h
29 --- a/plugins/video/common/dyna.h       2013-02-20 02:18:05.000000000 +0000
30 +++ b/plugins/video/common/dyna.h       2013-07-22 16:55:47.191281134 +0000
31 @@ -88,13 +88,13 @@ class DynaLink
32  class FFMPEGLibrary 
33  {
34    public:
35 -    FFMPEGLibrary(CodecID codec);
36 +    FFMPEGLibrary(AVCodecID codec);
37      ~FFMPEGLibrary();
38  
39      bool Load();
40  
41 -    AVCodec *AvcodecFindEncoder(enum CodecID id);
42 -    AVCodec *AvcodecFindDecoder(enum CodecID id);
43 +    AVCodec *AvcodecFindEncoder(enum AVCodecID id);
44 +    AVCodec *AvcodecFindDecoder(enum AVCodecID id);
45      AVCodecContext *AvcodecAllocContext(void);
46      AVFrame *AvcodecAllocFrame(void);
47      int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
48 @@ -117,15 +117,15 @@ class FFMPEGLibrary
49      DynaLink m_libAvcodec;
50      DynaLink m_libAvutil;
51  
52 -    CodecID m_codec;
53 +    AVCodecID m_codec;
54      char m_codecString[32];
55  
56      void (*Favcodec_init)(void);
57      void (*Fav_init_packet)(AVPacket *pkt);
58  
59      void (*Favcodec_register_all)(void);
60 -    AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
61 -    AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
62 +    AVCodec *(*Favcodec_find_encoder)(enum AVCodecID id);
63 +    AVCodec *(*Favcodec_find_decoder)(enum AVCodecID id);
64      AVCodecContext *(*Favcodec_alloc_context)(void);
65      AVFrame *(*Favcodec_alloc_frame)(void);
66      int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec);
67 diff -rupN a/plugins/video/common/ffmpeg/libavcodec/avcodec.h b/plugins/video/common/ffmpeg/libavcodec/avcodec.h
68 --- a/plugins/video/common/ffmpeg/libavcodec/avcodec.h  2013-02-20 02:18:04.000000000 +0000
69 +++ b/plugins/video/common/ffmpeg/libavcodec/avcodec.h  2013-07-22 16:55:47.167947971 +0000
70 @@ -101,7 +101,7 @@
71   * 1. no value of a existing codec ID changes (that would break ABI),
72   * 2. it is as close as possible to similar codecs.
73   */
74 -enum CodecID {
75 +enum AVCodecID {
76      CODEC_ID_NONE,
77  
78      /* video codecs */
79 @@ -1390,7 +1390,7 @@ typedef struct AVCodecContext {
80  
81      char codec_name[32];
82      enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
83 -    enum CodecID codec_id; /* see CODEC_ID_xxx */
84 +    enum AVCodecID codec_id; /* see CODEC_ID_xxx */
85  
86      /**
87       * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
88 @@ -2843,7 +2843,7 @@ typedef struct AVCodec {
89       */
90      const char *name;
91      enum AVMediaType type;
92 -    enum CodecID id;
93 +    enum AVCodecID id;
94      int priv_data_size;
95      int (*init)(AVCodecContext *);
96      int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
97 @@ -2898,7 +2898,7 @@ typedef struct AVHWAccel {
98       *
99       * See CODEC_ID_xxx
100       */
101 -    enum CodecID id;
102 +    enum AVCodecID id;
103  
104      /**
105       * Supported pixel format.
106 @@ -3402,10 +3402,10 @@ void avcodec_register(AVCodec *codec);
107  /**
108   * Find a registered encoder with a matching codec ID.
109   *
110 - * @param id CodecID of the requested encoder
111 + * @param id AVCodecID of the requested encoder
112   * @return An encoder if one was found, NULL otherwise.
113   */
114 -AVCodec *avcodec_find_encoder(enum CodecID id);
115 +AVCodec *avcodec_find_encoder(enum AVCodecID id);
116  
117  /**
118   * Find a registered encoder with the specified name.
119 @@ -3418,10 +3418,10 @@ AVCodec *avcodec_find_encoder_by_name(co
120  /**
121   * Find a registered decoder with a matching codec ID.
122   *
123 - * @param id CodecID of the requested decoder
124 + * @param id AVCodecID of the requested decoder
125   * @return A decoder if one was found, NULL otherwise.
126   */
127 -AVCodec *avcodec_find_decoder(enum CodecID id);
128 +AVCodec *avcodec_find_decoder(enum AVCodecID id);
129  
130  /**
131   * Find a registered decoder with the specified name.
132 @@ -3822,7 +3822,7 @@ char av_get_pict_type_char(int pict_type
133   * @param[in] codec_id the codec
134   * @return Number of bits per sample or zero if unknown for the given codec.
135   */
136 -int av_get_bits_per_sample(enum CodecID codec_id);
137 +int av_get_bits_per_sample(enum AVCodecID codec_id);
138  
139  #if FF_API_OLD_SAMPLE_FMT
140  /**
141 diff -rupN a/plugins/video/H.263-1998/h263-1998.cxx b/plugins/video/H.263-1998/h263-1998.cxx
142 --- a/plugins/video/H.263-1998/h263-1998.cxx    2013-02-20 02:18:03.000000000 +0000
143 +++ b/plugins/video/H.263-1998/h263-1998.cxx    2013-07-22 16:55:47.314613571 +0000
144 @@ -203,7 +203,7 @@ H263_Base_EncoderContext::~H263_Base_Enc
145    PTRACE(4, m_prefix, "Encoder closed");
146  }
147  
148 -bool H263_Base_EncoderContext::Init(CodecID codecId)
149 +bool H263_Base_EncoderContext::Init(AVCodecID codecId)
150  {
151    PTRACE(5, m_prefix, "Opening encoder");
152  
153 diff -rupN a/plugins/video/H.263-1998/h263-1998.h b/plugins/video/H.263-1998/h263-1998.h
154 --- a/plugins/video/H.263-1998/h263-1998.h      2013-02-20 02:18:03.000000000 +0000
155 +++ b/plugins/video/H.263-1998/h263-1998.h      2013-07-22 16:55:47.307946942 +0000
156 @@ -115,7 +115,7 @@ class H263_Base_EncoderContext
157      virtual ~H263_Base_EncoderContext();
158  
159      virtual bool Init() = 0;
160 -    virtual bool Init(CodecID codecId);
161 +    virtual bool Init(AVCodecID codecId);
162  
163      virtual bool SetOptions(const char * const * options);
164      virtual void SetOption(const char * option, const char * value);
165 diff -rupN a/plugins/video/H.264/h264-x264.cxx b/plugins/video/H.264/h264-x264.cxx
166 --- a/plugins/video/H.264/h264-x264.cxx 2013-02-20 02:18:02.000000000 +0000
167 +++ b/plugins/video/H.264/h264-x264.cxx 2013-07-22 17:05:35.383661843 +0000
168 @@ -40,6 +40,9 @@
169  #include "plugin-config.h"
170  #endif
171  
172 +#define FF_IDCT_H264 11
173 +#define CODEC_FLAG2_SKIP_RD 0x00004000
174 +
175  #include <codec/opalplugin.hpp>
176  
177  #include "../common/ffmpeg.h"
This page took 0.057025 seconds and 2 git commands to generate.