[FFmpeg-devel] [PATCH] Fix audiotoolboxenc compile error on OS X 10.8.
Fixes error "libavcodec/audiotoolboxenc.c:294:50: error: use of undeclared identifier 'kAudioCodecPropertyPacketSizeLimitForVBR'." That was added to 10.9: https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_9/AudioUnit.html Signed-off-by: Dan Dennedy --- libavcodec/audiotoolboxenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c index cb53f2a..c4d36f5 100644 --- a/libavcodec/audiotoolboxenc.c +++ b/libavcodec/audiotoolboxenc.c @@ -288,12 +288,14 @@ static av_cold int ffat_init_encoder(AVCodecContext *avctx) ffat_update_ctx(avctx); +#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 if (at->mode == kAudioCodecBitRateControlMode_Variable && avctx->rc_max_rate) { int max_size = avctx->rc_max_rate * avctx->frame_size / avctx->sample_rate; if (max_size) AudioConverterSetProperty(at->converter, kAudioCodecPropertyPacketSizeLimitForVBR, size, &max_size); } +#endif ff_af_queue_init(avctx, &at->afq); -- 2.4.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Fix videotoolbox compile error on OS X 10.8.
Fixes error: libavcodec/videotoolbox.c:511:18: error: implicit declaration of function 'CMVideoFormatDescriptionCreateFromH264ParameterSets' is invalid in C99 This was added in 10.9: https://developer.apple.com/reference/coremedia/1489818-cmvideoformatdescriptioncreatefr?language=objc --- libavcodec/videotoolbox.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 502b2e3..7b5245a 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -495,6 +495,8 @@ static CMVideoFormatDescriptionRef videotoolbox_format_desc_create(AVCodecContex { CMFormatDescriptionRef cm_fmt_desc = NULL; int status; + +#if TARGET_OS_IPHONE || defined(__MAC_10_9) H264Context *h = codec_type == kCMVideoCodecType_H264 ? avctx->priv_data : NULL; if (h && h->ps.sps->data_size && h->ps.pps->data_size) { @@ -522,6 +524,7 @@ static CMVideoFormatDescriptionRef videotoolbox_format_desc_create(AVCodecContex return NULL; } } else { +#endif status = CMVideoFormatDescriptionCreate(kCFAllocatorDefault, codec_type, width, @@ -533,7 +536,9 @@ static CMVideoFormatDescriptionRef videotoolbox_format_desc_create(AVCodecContex av_log(avctx, AV_LOG_ERROR, "Error creating format description: %d\n", status); return NULL; } +#if TARGET_OS_IPHONE || defined(__MAC_10_9) } +#endif return cm_fmt_desc; } -- 2.4.5 0001-Fix-videotoolbox-compile-error-on-OS-X-10.8.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Fix videotoolbox compile error on OS X 10.8.
On Sun, Jun 19, 2016 at 9:25 PM Richard Kern wrote: > > > On Jun 19, 2016, at 6:11 PM, Dan Dennedy wrote: > > > > Fixes error: > > libavcodec/videotoolbox.c:511:18: error: implicit declaration of > > function 'CMVideoFormatDescriptionCreateFromH264ParameterSets' is > > invalid in C99 > > > > This was added in 10.9: > > > https://developer.apple.com/reference/coremedia/1489818-cmvideoformatdescriptioncreatefr?language=objc > > Thanks for catching this - applied. > > If you have access to OS X 10.8, can you test using this hwaccel? > > My nightly build agent for my app is a hackintosh running 10.8, but I do not believe it has the hardware or driver to support vda or videotoolbox to test this on that machine. When I use ffmpeg -hwaccel with vda or videotoolbox, it fails to initialize. I can, however, successfully use a build made on it on another, real mac running a very recent OS X - probably not what you are interested in. I wanted to fix the compile error instead of disabling videotoolbox altogether in the build script. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Fix videotoolbox compile error on OS X 10.8.
On Mon, Jun 20, 2016 at 9:45 PM Dan Dennedy wrote: > On Sun, Jun 19, 2016 at 9:25 PM Richard Kern wrote: > >> >> > On Jun 19, 2016, at 6:11 PM, Dan Dennedy wrote: >> > >> > Fixes error: >> > libavcodec/videotoolbox.c:511:18: error: implicit declaration of >> > function 'CMVideoFormatDescriptionCreateFromH264ParameterSets' is >> > invalid in C99 >> > >> > This was added in 10.9: >> > >> https://developer.apple.com/reference/coremedia/1489818-cmvideoformatdescriptioncreatefr?language=objc >> >> Thanks for catching this - applied. >> >> If you have access to OS X 10.8, can you test using this hwaccel? >> >> > My nightly build agent for my app is a hackintosh running 10.8, but I do > not believe it has the hardware or driver to support vda or videotoolbox to > test this on that machine. When I use ffmpeg -hwaccel with vda or > videotoolbox, it fails to initialize. I can, however, successfully use a > build made on it on another, real mac running a very recent OS X - probably > not what you are interested in. > Actually, I have to retract this claim of a build made on 10.8 working on my MacBook Pro with OS X (10.11). It works using FFmpeg v3.0.2, which the app uses for releases. However, upon making a build using FFmpeg git master, -hwaccel videotoolbox is not working with the same AVCHD clip: /Applications/Shotcut.app/Contents/MacOS/ffmpeg -v verbose -hwaccel videotoolbox -threads 1 -i ~/Movies/00108.MTS -t 30 -y test.mp4 ... [NULL @ 0x7f9659026200] Ignoring NAL type 9 in extradata Error creating Videotoolbox decoder. videotoolbox hwaccel requested for input stream #0:0, but cannot be initialized. My app is not using hwaccel at this time; so, not a big deal for me. But, I thought you might want to know. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: added HLS encryption
On Wed, Feb 11, 2015 at 12:20 PM Michael Niedermayer wrote: > > please provide a example which works > this is not an example its a description of how to create an example > I mean example in the sense that its bytes when given to the right > program like /bin/sh will do something not a description that needs > a human to interpret it first. > > as is it might take 5 or 10 min to turn this text into some actual > example and testcase and theres no reason why when this is tested > again in 6 month the same testcase would be created by a human > and if its not the same testcase we would not know if something broke > if it no longer works or if we just failed to re create the testcase > IMO its important to have a reproduceable example/testcase > > I would like to help get this patch included. I updated it against git master today and created a complete example shell script in both the commit message and doc/muxers.texi: #!/bin/sh BASE_URL=${1:-'.'} openssl rand 16 > file.key echo $BASE_URL/file.key > file.keyinfo echo file.key >> file.keyinfo echo $(openssl rand -hex 16) >> file.keyinfo ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \ -hls_key_info_file file.keyinfo out.m3u8 -- +-DRD-+ 0001-avformat-hlsenc-added-HLS-encryption.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel