From: Sergey Bolshakov <sbolshakov@altlinux.ru> To: devel@lists.altlinux.org Subject: Re: [devel] [I] new libav in town Date: Tue, 09 Aug 2011 10:37:12 +0400 Message-ID: <m3hb5r2iqv.fsf@hammer.lioka.obninsk.ru> (raw) In-Reply-To: <4E409891.80500@tangramltd.com> (Dubrovskiy Viacheslav's message of "Mon, 08 Aug 2011 22:16:49 -0400") [-- Attachment #1: Type: text/plain, Size: 455 bytes --] >>>>> "Dubrovskiy" == Dubrovskiy Viacheslav <slava-caBWNg7LwhOlzlObeVyAOA@public.gmane.org> writes: > 02.08.2011 04:57, Sergey Bolshakov пишет: >> Привет. >> Сегодня в сизиф, тихо и незаметно, попал libav, наследник ffmpeg. >> Поскольку API у libav несколько отличается, прогнозируется >> некоторый слом со сборкой зависимых пакетов, прошу обращаться >> за содействием в починке, если таковое понадобится. > Как такое чинить? see attached patch [-- Attachment #2: 0001-adapt-for-libav-0.7.patch --] [-- Type: text/x-patch, Size: 3293 bytes --] >From 6d2db6bcfa14fa84655d85787caf1fbaf470b6be Mon Sep 17 00:00:00 2001 From: Sergey Bolshakov <sbolshakov@altlinux.org> Date: Wed, 22 Jun 2011 14:54:42 +0400 Subject: [PATCH] adapt for libav-0.7 --- src/mgui/ffviewer.cpp | 15 ++++++--------- src/mgui/project/media-browser.cpp | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/mgui/ffviewer.cpp b/src/mgui/ffviewer.cpp index 30d65a7..c2d9cc6 100644 --- a/src/mgui/ffviewer.cpp +++ b/src/mgui/ffviewer.cpp @@ -315,15 +315,15 @@ bool OpenInfo(FFData& ffi, const char* fname, std::string& err_str) { switch( av_res ) { - case AVERROR_NOENT: + case AVERROR(ENOENT): // :TODO: решить, ставить в конце точки или нет (сообщения пользователю // показывается не HIG-ого) err_str = _("No such file"); break; - case AVERROR_NOFMT: + case AVERROR(EILSEQ): err_str = _("Unknown file format"); break; - case AVERROR_UNKNOWN: + case AVERROR(EINVAL): default: err_str = boost::format("FFmpeg unknown error: %1%") % av_res % bf::stop; break; @@ -351,13 +351,13 @@ bool OpenInfo(FFData& ffi, const char* fname, std::string& err_str) { AVStream* strm = ic->streams[i]; AVCodecContext* avctx = strm->codec; - if( SetIndex(video_idx, i, avctx->codec_type == CODEC_TYPE_VIDEO) ) + if( SetIndex(video_idx, i, avctx->codec_type == AVMEDIA_TYPE_VIDEO) ) ; else // для демиксера имеет значение только NONE и ALL strm->discard = AVDISCARD_ALL; - SetIndex(audio_idx, i, avctx->codec_type == CODEC_TYPE_AUDIO); + SetIndex(audio_idx, i, avctx->codec_type == AVMEDIA_TYPE_AUDIO); } if( video_idx == -1 ) @@ -522,7 +522,7 @@ static double TS2Time(int64_t ts, FFViewer& ffv) static bool IsInHurry(AVCodecContext* dec) { - return dec->hurry_up != 0; + return dec->skip_frame != AVDISCARD_DEFAULT; } struct HurryModeEnabler @@ -531,8 +531,6 @@ struct HurryModeEnabler HurryModeEnabler(AVCodecContext* dec_): dec(dec_) { - // как признак (хоть и устаревший) - dec->hurry_up = 1; // Прирост скорости (h264): // - AVDISCARD_NONREF: 2x // - AVDISCARD_BIDIR: для h264 (и других современных кодеков?) разница в скорости @@ -552,7 +550,6 @@ struct HurryModeEnabler } ~HurryModeEnabler() { - dec->hurry_up = 0; dec->skip_frame = AVDISCARD_DEFAULT; //dec->skip_idct = AVDISCARD_DEFAULT; //dec->skip_loop_filter = AVDISCARD_DEFAULT; diff --git a/src/mgui/project/media-browser.cpp b/src/mgui/project/media-browser.cpp index 541dc81..c50fe11 100644 --- a/src/mgui/project/media-browser.cpp +++ b/src/mgui/project/media-browser.cpp @@ -232,7 +232,7 @@ RTCache& GetRTC(VideoItem vi) for( int i=0; i < (int)ic->nb_streams; i++ ) { AVCodecContext* avctx = ic->streams[i]->codec; - if( avctx->codec_type == CODEC_TYPE_AUDIO ) + if( avctx->codec_type == AVMEDIA_TYPE_AUDIO ) rtc.audioNum++; } -- 1.7.5.4 [-- Attachment #3: Type: text/plain, Size: 5 bytes --] --
next prev parent reply other threads:[~2011-08-09 6:37 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-02 8:57 Sergey Bolshakov 2011-08-03 8:19 ` Slava Semushin 2011-08-03 8:22 ` REAL 2011-08-03 9:26 ` Sergey Bolshakov 2011-08-03 9:35 ` Slava Semushin 2011-08-03 12:50 ` Konstantin Pavlov 2011-08-03 9:34 ` Sergey Kurakin 2011-08-04 11:09 ` Sergey Kurakin 2011-08-09 2:16 ` Dubrovskiy Viacheslav 2011-08-09 6:37 ` Sergey Bolshakov [this message] 2011-08-16 12:22 ` Dubrovskiy Viacheslav 2011-08-16 13:10 ` Sergey Bolshakov 2011-08-16 13:15 ` Dubrovskiy Viacheslav 2011-08-16 13:50 ` Sergey Bolshakov 2011-08-16 14:31 ` Dubrovskiy Viacheslav
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=m3hb5r2iqv.fsf@hammer.lioka.obninsk.ru \ --to=sbolshakov@altlinux.ru \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git