diff options
Diffstat (limited to 'multimedia/zoneminder-h264/files/patch-ffmpeg4')
-rw-r--r-- | multimedia/zoneminder-h264/files/patch-ffmpeg4 | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/multimedia/zoneminder-h264/files/patch-ffmpeg4 b/multimedia/zoneminder-h264/files/patch-ffmpeg4 deleted file mode 100644 index 5504569c09a6..000000000000 --- a/multimedia/zoneminder-h264/files/patch-ffmpeg4 +++ /dev/null @@ -1,122 +0,0 @@ -Partially based on https://github.com/ZoneMinder/zoneminder/commit/e17bcb9178d0 - ---- src/zm_mpeg.cpp.orig 2017-02-21 21:28:53 UTC -+++ src/zm_mpeg.cpp -@@ -240,7 +240,11 @@ void VideoStream::SetupCodec( int colours, int subpixe - { - // Quality based bitrate control (VBR). Scale is 1..31 where 1 is best. - // This gets rid of artifacts in the beginning of the movie; and well, even quality. -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ c->flags |= AV_CODEC_FLAG_QSCALE; -+#else - c->flags |= CODEC_FLAG_QSCALE; -+#endif - c->global_quality = FF_QP2LAMBDA * (31 - (31 * (bitrate / 100.0))); - } - else -@@ -265,7 +269,11 @@ void VideoStream::SetupCodec( int colours, int subpixe - - // some formats want stream headers to be separate - if ( of->flags & AVFMT_GLOBALHEADER ) -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+#else - c->flags |= CODEC_FLAG_GLOBAL_HEADER; -+#endif - } - else - { -@@ -425,7 +433,9 @@ void VideoStream::OpenStream( ) - } - - video_outbuf = NULL; -+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0) - if ( !(of->flags & AVFMT_RAWPICTURE) ) -+#endif - { - /* allocate output buffer */ - /* XXX: API change will be done */ -@@ -672,6 +682,7 @@ double VideoStream::ActuallyEncodeFrame( const uint8_t - AVPacket *pkt = packet_buffers[packet_index]; - av_init_packet( pkt ); - int got_packet = 0; -+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0) - if ( of->flags & AVFMT_RAWPICTURE ) - { - #if LIBAVCODEC_VERSION_CHECK(52, 30, 2, 30, 2) -@@ -685,6 +696,7 @@ double VideoStream::ActuallyEncodeFrame( const uint8_t - got_packet = 1; - } - else -+#endif - { - opicture_ptr->pts = c->frame_number; - opicture_ptr->quality = c->global_quality; ---- src/zm_sdp.cpp.orig 2017-02-21 21:28:53 UTC -+++ src/zm_sdp.cpp -@@ -483,7 +483,11 @@ AVFormatContext *SessionDescriptor::generateFormatCont - uint8_t *dest = - (uint8_t *)av_malloc(packet_size + sizeof(start_sequence) + - stream->codec->extradata_size + -+#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0) -+ AV_INPUT_BUFFER_PADDING_SIZE); -+#else - FF_INPUT_BUFFER_PADDING_SIZE); -+#endif - if(dest) { - if(stream->codec->extradata_size) { - // av_realloc? -@@ -494,7 +498,11 @@ AVFormatContext *SessionDescriptor::generateFormatCont - memcpy(dest+stream->codec->extradata_size, start_sequence, sizeof(start_sequence)); - memcpy(dest+stream->codec->extradata_size+sizeof(start_sequence), decoded_packet, packet_size); - memset(dest+stream->codec->extradata_size+sizeof(start_sequence)+ -+#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0) -+ packet_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); -+#else - packet_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); -+#endif - - stream->codec->extradata= dest; - stream->codec->extradata_size+= sizeof(start_sequence)+packet_size; ---- src/zm_videostore.cpp.orig 2017-02-21 21:28:53 UTC -+++ src/zm_videostore.cpp -@@ -113,7 +113,11 @@ VideoStore::VideoStore(const char *filename_in, const - - video_st->codec->codec_tag = 0; - if (oc->oformat->flags & AVFMT_GLOBALHEADER) { -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ video_st->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+#else - video_st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; -+#endif - } - - if ( orientation ) { -@@ -146,7 +150,11 @@ VideoStore::VideoStore(const char *filename_in, const - } - audio_st->codec->codec_tag = 0; - if (oc->oformat->flags & AVFMT_GLOBALHEADER) { -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ audio_st->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+#else - audio_st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; -+#endif - } - } - } else { -@@ -283,6 +291,7 @@ int VideoStore::writeVideoFramePacket(AVPacket *ipkt, - - /*opkt.flags |= AV_PKT_FLAG_KEY;*/ - -+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0) - if (video_st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (fmt->flags & AVFMT_RAWPICTURE)) { - /* store AVPicture in AVPacket, as expected by the output format */ - avpicture_fill(&pict, opkt.data, video_st->codec->pix_fmt, video_st->codec->width, video_st->codec->height); -@@ -290,6 +299,7 @@ int VideoStore::writeVideoFramePacket(AVPacket *ipkt, - opkt.size = sizeof(AVPicture); - opkt.flags |= AV_PKT_FLAG_KEY; - } -+#endif - - memcpy(&safepkt, &opkt, sizeof(AVPacket)); - |