/[packages]/cauldron/xbmc/current/SOURCES/0122-Remove-av_set_parameters.patch
ViewVC logotype

Contents of /cauldron/xbmc/current/SOURCES/0122-Remove-av_set_parameters.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 269300 - (show annotations) (download)
Tue Jul 10 19:13:54 2012 UTC (11 years, 9 months ago) by anssi
File size: 5158 byte(s)
- fix missing include in wiiremote eventclient
  (wiiremote-missing-include.patch)
- backport FFmpeg support patches to allow build with cauldron ffmpeg
  (patches 101..145)

1 From 807e78511a27789fc86b03a9df6c8c3fcc1cd54d Mon Sep 17 00:00:00 2001
2 From: Alexis Ballier <aballier@gentoo.org>
3 Date: Thu, 1 Mar 2012 10:44:00 -0300
4 Subject: [PATCH 122/145] Remove av_set_parameters.
5
6 It is gone in libavformat 54 and avformat_write_header takes care of allocating data as needed.
7 (cherry picked from commit 157206286d3a165f97c4d0ef67e70756d6b4f496)
8 ---
9 lib/DllAvFormat.h | 4 ----
10 xbmc/cdrip/EncoderFFmpeg.cpp | 9 ---------
11 .../DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp | 9 ---------
12 3 files changed, 22 deletions(-)
13
14 diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h
15 index df946ee..0671fee 100644
16 --- a/lib/DllAvFormat.h
17 +++ b/lib/DllAvFormat.h
18 @@ -98,7 +98,6 @@ public:
19 virtual AVFormatContext *avformat_alloc_context(void)=0;
20 virtual AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)=0;
21 virtual AVOutputFormat *av_guess_format(const char *short_name, const char *filename, const char *mime_type)=0;
22 - virtual int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap)=0;
23 virtual AVIOContext *av_alloc_put_byte(unsigned char *buffer, int buffer_size, int write_flag, void *opaque,
24 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
25 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
26 @@ -162,7 +161,6 @@ public:
27 virtual AVFormatContext *avformat_alloc_context() { return ::avformat_alloc_context(); }
28 virtual AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c) { return ::avformat_new_stream(s, c); }
29 virtual AVOutputFormat *av_guess_format(const char *short_name, const char *filename, const char *mime_type) { return ::av_guess_format(short_name, filename, mime_type); }
30 - virtual int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap) { return ::av_set_parameters(s, ap); }
31 virtual AVIOContext *av_alloc_put_byte(unsigned char *buffer, int buffer_size, int write_flag, void *opaque,
32 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
33 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
34 @@ -225,7 +223,6 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface
35 DEFINE_METHOD0(AVFormatContext *, avformat_alloc_context)
36 DEFINE_METHOD2(AVStream *, avformat_new_stream, (AVFormatContext *p1, AVCodec *p2))
37 DEFINE_METHOD3(AVOutputFormat *, av_guess_format, (const char *p1, const char *p2, const char *p3))
38 - DEFINE_METHOD2(int, av_set_parameters, (AVFormatContext *p1, AVFormatParameters *p2));
39 DEFINE_METHOD7(AVIOContext *, av_alloc_put_byte, (unsigned char *p1, int p2, int p3, void *p4,
40 int(*p5)(void *opaque, uint8_t *buf, int buf_size),
41 int(*p6)(void *opaque, uint8_t *buf, int buf_size),
42 @@ -268,7 +265,6 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface
43 RESOLVE_METHOD(avformat_alloc_context)
44 RESOLVE_METHOD(avformat_new_stream)
45 RESOLVE_METHOD(av_guess_format)
46 - RESOLVE_METHOD(av_set_parameters)
47 RESOLVE_METHOD(av_alloc_put_byte)
48 RESOLVE_METHOD(avformat_write_header)
49 RESOLVE_METHOD(av_write_trailer)
50 diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp
51 index 13c9772..7959919 100644
52 --- a/xbmc/cdrip/EncoderFFmpeg.cpp
53 +++ b/xbmc/cdrip/EncoderFFmpeg.cpp
54 @@ -89,15 +89,6 @@ bool CEncoderFFmpeg::Init(const char* strFile, int iInChannels, int iInRate, int
55 m_Format->oformat = fmt;
56 m_Format->bit_rate = g_guiSettings.GetInt("audiocds.bitrate") * 1000;
57
58 - /* setup the muxer */
59 - if (m_dllAvFormat.av_set_parameters(m_Format, NULL) != 0)
60 - {
61 - m_dllAvUtil.av_freep(&m_Format->pb);
62 - m_dllAvUtil.av_freep(&m_Format);
63 - CLog::Log(LOGERROR, "CEncoderFFmpeg::Init - Failed to set the muxer parameters");
64 - return false;
65 - }
66 -
67 /* add a stream to it */
68 m_Stream = m_dllAvFormat.avformat_new_stream(m_Format, codec);
69 if (!m_Stream)
70 diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
71 index 4257f96..d230623 100644
72 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
73 +++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
74 @@ -112,15 +112,6 @@ bool CDVDAudioCodecPassthroughFFmpeg::SetupMuxer(CDVDStreamInfo &hints, CStdStri
75 muxer.m_pFormat->flags |= AVFMT_NOFILE | AVFMT_FLAG_IGNIDX;
76 muxer.m_pFormat->bit_rate = hints.bitrate;
77
78 - /* setup the muxer */
79 - if (m_dllAvFormat.av_set_parameters(muxer.m_pFormat, NULL) != 0)
80 - {
81 - CLog::Log(LOGERROR, "CDVDAudioCodecPassthroughFFmpeg::SetupMuxer - Failed to set the %s muxer parameters", muxerName.c_str());
82 - Dispose();
83 - return false;
84 - }
85 -
86 -
87 /* While this is strictly only needed on big-endian systems, we do it on
88 * both to avoid as much dead code as possible.
89 * CoreAudio (at least on the cases we've seen) wants IEC 61937 in
90 --
91 1.7.10
92

  ViewVC Help
Powered by ViewVC 1.1.30