]> git.pld-linux.org Git - packages/chromium-browser.git/blob - system-ffmpeg.patch
up to 32.0.1700.102
[packages/chromium-browser.git] / system-ffmpeg.patch
1 --- a/media/filters/ffmpeg_glue.h
2 +++ b/media/filters/ffmpeg_glue.h
3 @@ -28,9 +28,9 @@
4  #include "base/basictypes.h"
5  #include "base/memory/scoped_ptr.h"
6  #include "media/base/media_export.h"
7 +#include "media/ffmpeg/ffmpeg_common.h"
8  
9  struct AVFormatContext;
10 -struct AVIOContext;
11  
12  namespace media {
13  
14 --- a/media/ffmpeg/ffmpeg_common.cc.orig        2013-01-17 00:07:51.635057013 +0000
15 +++ b/media/ffmpeg/ffmpeg_common.cc     2013-01-17 00:15:50.867406811 +0000
16 @@ -85,8 +85,10 @@
17        return kCodecGSM_MS;
18      case AV_CODEC_ID_PCM_MULAW:
19        return kCodecPCM_MULAW;
20 +#ifndef CHROMIUM_OMIT_AV_CODEC_ID_OPUS
21      case AV_CODEC_ID_OPUS:
22        return kCodecOpus;
23 +#endif
24      default:
25        DVLOG(1) << "Unknown audio CodecID: " << codec_id;
26    }
27 @@ -130,8 +132,10 @@
28        return AV_CODEC_ID_GSM_MS;
29      case kCodecPCM_MULAW:
30        return AV_CODEC_ID_PCM_MULAW;
31 +#ifndef CHROMIUM_OMIT_AV_CODEC_ID_OPUS
32      case kCodecOpus:
33        return AV_CODEC_ID_OPUS;
34 +#endif
35      default:
36        DVLOG(1) << "Unknown AudioCodec: " << audio_codec;
37    }
38 @@ -149,8 +153,10 @@
39        return kCodecMPEG4;
40      case AV_CODEC_ID_VP8:
41        return kCodecVP8;
42 +#ifndef CHROMIUM_OMIT_AV_CODEC_ID_VP9
43      case AV_CODEC_ID_VP9:
44        return kCodecVP9;
45 +#endif
46      default:
47        DVLOG(1) << "Unknown video CodecID: " << codec_id;
48    }
49 @@ -167,8 +173,10 @@
50        return AV_CODEC_ID_MPEG4;
51      case kCodecVP8:
52        return AV_CODEC_ID_VP8;
53 +#ifndef CHROMIUM_OMIT_AV_CODEC_ID_VP9
54      case kCodecVP9:
55        return AV_CODEC_ID_VP9;
56 +#endif
57      default:
58        DVLOG(1) << "Unknown VideoCodec: " << video_codec;
59    }
60 --- a/media/filters/ffmpeg_demuxer.cc.orig      2013-05-09 18:04:25.089276403 +0000
61 +++ b/media/filters/ffmpeg_demuxer.cc   2013-05-09 18:05:16.289599070 +0000
62 @@ -111,12 +111,15 @@
63    // Get side data if any. For now, the only type of side_data is VP8 Alpha. We
64    // keep this generic so that other side_data types in the future can be
65    // handled the same way as well.
66 -  av_packet_split_side_data(packet.get());
67    int side_data_size = 0;
68 -  uint8* side_data = av_packet_get_side_data(
69 +  uint8* side_data = NULL;
70 +#ifndef CHROMIUM_OMIT_AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
71 +  av_packet_split_side_data(packet.get());
72 +  side_data = av_packet_get_side_data(
73        packet.get(),
74        AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
75        &side_data_size);
76 +#endif
77  
78    // If a packet is returned by FFmpeg's av_parser_parse2() the packet will
79    // reference inner memory of FFmpeg.  As such we should transfer the packet
80 --- a/media/base/media_posix.cc.orig    2013-05-24 20:59:12.963046035 +0000
81 +++ b/media/base/media_posix.cc 2013-05-24 20:59:50.593275882 +0000
82 @@ -11,12 +11,15 @@
83  #include "base/path_service.h"
84  #include "base/strings/stringize_macros.h"
85  #include "media/ffmpeg/ffmpeg_common.h"
86 +
87 +#if !defined(USE_SYSTEM_FFMPEG)
88  #include "third_party/ffmpeg/ffmpeg_stubs.h"
89  
90  using third_party_ffmpeg::kNumStubModules;
91  using third_party_ffmpeg::kModuleFfmpegsumo;
92  using third_party_ffmpeg::InitializeStubs;
93  using third_party_ffmpeg::StubPathMap;
94 +#endif
95  
96  namespace media {
97  namespace internal {
98 @@ -46,6 +49,9 @@
99  #endif
100  
101  bool InitializeMediaLibraryInternal(const base::FilePath& module_dir) {
102 +#if defined(USE_SYSTEM_FFMPEG)
103 +  return true;
104 +#else
105    StubPathMap paths;
106  
107    // First try to initialize with Chrome's sumo library.
108 @@ -61,6 +67,7 @@
109        FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION))).value());
110  
111    return InitializeStubs(paths);
112 +#endif
113  }
114  
115  }  // namespace internal
This page took 0.052978 seconds and 3 git commands to generate.