[SCM] gpac/master: Refresh patches.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Tue Jul 8 12:22:04 UTC 2014
The following commit has been merged in the master branch:
commit 9e4009b9fa8f1760b8f236144849a11dd8c008b9
Author: Alessio Treglia <alessio at debian.org>
Date: Tue Jul 8 13:18:18 2014 +0100
Refresh patches.
diff --git a/debian/patches/export_gf_isom_set_pixel_aspect_ratio.patch b/debian/patches/export_gf_isom_set_pixel_aspect_ratio.patch
index af9aa9e..dd1050f 100644
--- a/debian/patches/export_gf_isom_set_pixel_aspect_ratio.patch
+++ b/debian/patches/export_gf_isom_set_pixel_aspect_ratio.patch
@@ -2,9 +2,13 @@ Description: export gf_isom_set_pixel_aspect_ratio
At least libx264 depends on it, and breaks when not linking statically
Author: Reinhard Tartler <siretart at tauware.de>
---- gpac-0.5.0+svn5194~dfsg1.orig/src/isomedia/isom_write.c
-+++ gpac-0.5.0+svn5194~dfsg1/src/isomedia/isom_write.c
-@@ -1209,6 +1209,7 @@ GF_Err gf_isom_set_visual_info(GF_ISOFil
+---
+ src/isomedia/isom_write.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- gpac.orig/src/isomedia/isom_write.c
++++ gpac/src/isomedia/isom_write.c
+@@ -1213,6 +1213,7 @@ GF_Err gf_isom_set_visual_info(GF_ISOFil
}
}
diff --git a/debian/patches/gcc-optflags.patch b/debian/patches/gcc-optflags.patch
index 0e7f0a3..d71ba8d 100644
--- a/debian/patches/gcc-optflags.patch
+++ b/debian/patches/gcc-optflags.patch
@@ -5,9 +5,9 @@ Forwarded: not-needed
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---- a/configure
-+++ b/configure
-@@ -342,7 +342,7 @@ for opt do
+--- gpac.orig/configure
++++ gpac/configure
+@@ -343,7 +343,7 @@ for opt do
;;
--cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
;;
@@ -16,7 +16,7 @@ Forwarded: not-needed
;;
--disable-opt) no_gcc_opt="yes"
;;
-@@ -642,7 +642,7 @@ fi
+@@ -643,7 +643,7 @@ fi
#GCC opt
if test "$no_gcc_opt" = "no"; then
diff --git a/debian/patches/libav10.patch b/debian/patches/libav10.patch
index 0cf291b..838133e 100644
--- a/debian/patches/libav10.patch
+++ b/debian/patches/libav10.patch
@@ -1,9 +1,15 @@
Author: Reinhard Tartler <siretart at tauware.de>
Description: Allow compilation against libav10
---- a/applications/dashcast/video_decoder.c
-+++ b/applications/dashcast/video_decoder.c
-@@ -338,7 +338,7 @@ int dc_video_decoder_read(VideoInputFile
+---
+ applications/dashcast/video_decoder.c | 2 -
+ modules/ffmpeg_in/ffmpeg_decode.c | 56 +++++++++++++++++-----------------
+ modules/ffmpeg_in/ffmpeg_demux.c | 22 +++++--------
+ 3 files changed, 38 insertions(+), 42 deletions(-)
+
+--- gpac.orig/applications/dashcast/video_decoder.c
++++ gpac/applications/dashcast/video_decoder.c
+@@ -347,7 +347,7 @@ int dc_video_decoder_read(VideoInputFile
//But if the input is raw and there is no need to decode then
// the packet is directly passed for decoded frame. We must wait until rescale is done before freeing it
@@ -12,39 +18,9 @@ Description: Allow compilation against libav10
video_data_node->nb_raw_frames_ref = video_input_file->nb_consumers;
video_data_node->raw_packet = packet;
---- a/applications/dashcast/video_encoder.c
-+++ b/applications/dashcast/video_encoder.c
-@@ -68,9 +68,9 @@ int dc_video_encoder_open(VideoOutputFil
- video_output_file->vbuf = (uint8_t *) av_malloc(video_output_file->vbuf_size);
-
- // video_output_file->codec = avcodec_find_encoder_by_name("libx264"/*video_data_conf->codec*/);
-- video_output_file->codec = avcodec_find_encoder(CODEC_ID_H264);
-+ video_output_file->codec = avcodec_find_encoder(AV_CODEC_ID_H264);
- if (video_output_file->codec == NULL) {
-- GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("Output video codec %d not found\n", CODEC_ID_H264));
-+ GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("Output video codec %d not found\n", AV_CODEC_ID_H264));
- return -1;
- }
-
-@@ -216,15 +216,9 @@ int dc_video_encoder_encode(VideoOutputF
- pkt.data = video_output_file->vbuf;
- pkt.size = video_output_file->vbuf_size;
- pkt.pts = pkt.dts = video_data_node->vframe->pkt_dts = video_data_node->vframe->pkt_pts = video_data_node->vframe->pts;
--#ifdef GPAC_USE_LIBAV
-- video_output_file->encoded_frame_size = avcodec_encode_video(video_codec_ctx, video_output_file->vbuf, video_output_file->vbuf_size, video_data_node->vframe);
-- got_packet = video_output_file->encoded_frame_size>=0 ? 1 : 0;
--#else
- video_output_file->encoded_frame_size = avcodec_encode_video2(video_codec_ctx, &pkt, video_data_node->vframe, &got_packet);
-- //this is not true with libav !
- if (video_output_file->encoded_frame_size >= 0)
- video_output_file->encoded_frame_size = pkt.size;
--#endif
- if (video_output_file->encoded_frame_size >= 0) {
- if (got_packet) {
- video_codec_ctx->coded_frame->pts = video_codec_ctx->coded_frame->pkt_pts = pkt.pts;
---- a/modules/ffmpeg_in/ffmpeg_decode.c
-+++ b/modules/ffmpeg_in/ffmpeg_decode.c
-@@ -101,7 +101,7 @@ static void FFDEC_LoadDSI(FFDec *ffd, GF
+--- gpac.orig/modules/ffmpeg_in/ffmpeg_decode.c
++++ gpac/modules/ffmpeg_in/ffmpeg_decode.c
+@@ -102,7 +102,7 @@ static void FFDEC_LoadDSI(FFDec *ffd, GF
}
switch (codec->id) {
@@ -53,7 +29,7 @@ Description: Allow compilation against libav10
{
u32 at_type, size;
size = gf_bs_read_u32(bs);
-@@ -239,10 +239,10 @@ static GF_Err FFDEC_AttachStream(GF_Base
+@@ -240,10 +240,10 @@ static GF_Err FFDEC_AttachStream(GF_Base
(*ctx)->codec_type = AVMEDIA_TYPE_VIDEO;
switch (ffd->oti) {
case GPAC_OTI_VIDEO_MPEG4_PART2:
@@ -65,8 +41,8 @@ Description: Allow compilation against libav10
+ codec_id = AV_CODEC_ID_H264;
break;
#ifdef HAS_HEVC
- case GPAC_OTI_VIDEO_HEVC:
-@@ -256,14 +256,14 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ case GPAC_OTI_VIDEO_HEVC:
+@@ -257,14 +257,14 @@ static GF_Err FFDEC_AttachStream(GF_Base
case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
case GPAC_OTI_VIDEO_MPEG2_HIGH:
case GPAC_OTI_VIDEO_MPEG2_422:
@@ -84,13 +60,21 @@ Description: Allow compilation against libav10
break;
}
} else if (ffd->st==GF_STREAM_AUDIO) {
-@@ -272,12 +272,12 @@ static GF_Err FFDEC_AttachStream(GF_Base
+@@ -273,18 +273,18 @@ static GF_Err FFDEC_AttachStream(GF_Base
case GPAC_OTI_AUDIO_MPEG2_PART3:
case GPAC_OTI_AUDIO_MPEG1:
(*ctx)->frame_size = 1152;
- codec_id = CODEC_ID_MP2;
+ codec_id = AV_CODEC_ID_MP2;
break;
+ case GPAC_OTI_AUDIO_AC3:
+- codec_id = CODEC_ID_AC3;
++ codec_id = AV_CODEC_ID_AC3;
+ break;
+ case GPAC_OTI_AUDIO_EAC3:
+- codec_id = CODEC_ID_EAC3;
++ codec_id = AV_CODEC_ID_EAC3;
+ break;
}
}
else if ((ffd->st==GF_STREAM_ND_SUBPIC) && (ffd->oti==0xe0)) {
@@ -99,7 +83,7 @@ Description: Allow compilation against libav10
}
*codec = avcodec_find_decoder(codec_id);
}
-@@ -363,8 +363,8 @@ static GF_Err FFDEC_AttachStream(GF_Base
+@@ -375,8 +375,8 @@ static GF_Err FFDEC_AttachStream(GF_Base
#endif //HAS_HEVC
if (!ffd->output_cb_size) ffd->output_cb_size = 4;
@@ -110,7 +94,7 @@ Description: Allow compilation against libav10
(*ctx)->pix_fmt = ffd->raw_pix_fmt;
if ((*ctx)->extradata && strstr((char *) (*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
} else {
-@@ -376,7 +376,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
+@@ -388,7 +388,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
}
/*setup audio streams*/
if (ffd->st==GF_STREAM_AUDIO) {
@@ -119,7 +103,7 @@ Description: Allow compilation against libav10
(*ctx)->frame_size = ((*ctx)->sample_rate > 24000) ? 1152 : 576;
}
/*may be 0 (cfg not known yet)*/
-@@ -390,17 +390,17 @@ static GF_Err FFDEC_AttachStream(GF_Base
+@@ -408,17 +408,17 @@ static GF_Err FFDEC_AttachStream(GF_Base
} else {
switch ((*codec)->id) {
@@ -140,10 +124,10 @@ Description: Allow compilation against libav10
- case CODEC_ID_DVD_SUBTITLE:
+ case AV_CODEC_ID_DVD_SUBTITLE:
+ #ifndef FF_API_AVFRAME_LAVC
*frame = avcodec_alloc_frame();
- #ifdef USE_AVCODEC2
- {
-@@ -783,7 +783,7 @@ redecode:
+ #else
+@@ -816,7 +816,7 @@ redecode:
}
@@ -152,7 +136,7 @@ Description: Allow compilation against libav10
if (*outBufferLength != ffd->out_size) {
*outBufferLength = ffd->out_size;
return GF_BUFFER_TOO_SMALL;
-@@ -880,7 +880,7 @@ redecode:
+@@ -913,7 +913,7 @@ redecode:
/*OK we loose the DSI stored in the codec context, but H263 doesn't need any, and if we're
here this means the DSI was broken, so no big deal*/
avcodec_close(ctx);
@@ -161,46 +145,53 @@ Description: Allow compilation against libav10
#ifdef USE_AVCTX3
if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
-@@ -1200,9 +1200,9 @@ static u32 FFDEC_CanHandleStream(GF_Base
- }
- else if (StreamType==GF_STREAM_AUDIO) {
- /*std MPEG-2 audio*/
-- if ((ffd->oti==GPAC_OTI_AUDIO_MPEG2_PART3) || (ffd->oti==GPAC_OTI_AUDIO_MPEG1)) codec_id = CODEC_ID_MP2;
-+ if ((ffd->oti==GPAC_OTI_AUDIO_MPEG2_PART3) || (ffd->oti==GPAC_OTI_AUDIO_MPEG1)) codec_id = AV_CODEC_ID_MP2;
- /*std AC3 audio*/
-- //if (ffd->oti==0xA5) codec_id = CODEC_ID_AC3;
-+ //if (ffd->oti==0xA5) codec_id = AV_CODEC_ID_AC3;
+@@ -1236,13 +1236,13 @@ static u32 FFDEC_CanHandleStream(GF_Base
+ switch (ffd->oti) {
+ case GPAC_OTI_AUDIO_MPEG2_PART3:
+ case GPAC_OTI_AUDIO_MPEG1:
+- codec_id = CODEC_ID_MP2;
++ codec_id = AV_CODEC_ID_MP2;
+ break;
+ case GPAC_OTI_AUDIO_AC3:
+- codec_id = CODEC_ID_AC3;
++ codec_id = AV_CODEC_ID_AC3;
+ break;
+ case GPAC_OTI_AUDIO_EAC3:
+- codec_id = CODEC_ID_EAC3;
++ codec_id = AV_CODEC_ID_EAC3;
+ break;
+ }
}
-
- /*std MPEG-4 visual*/
-@@ -1239,10 +1239,10 @@ static u32 FFDEC_CanHandleStream(GF_Base
-
+@@ -1282,11 +1282,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
switch (ffd->oti) {
/*MPEG-4 v1 simple profile*/
-- case GPAC_OTI_VIDEO_MPEG4_PART2: codec_id = CODEC_ID_MPEG4; break;
-+ case GPAC_OTI_VIDEO_MPEG4_PART2: codec_id = AV_CODEC_ID_MPEG4; break;
+ case GPAC_OTI_VIDEO_MPEG4_PART2:
+- codec_id = CODEC_ID_MPEG4;
++ codec_id = AV_CODEC_ID_MPEG4;
+ break;
/*H264 (not std OTI, just the way we use it internally)*/
case GPAC_OTI_VIDEO_AVC:
-- codec_id = CODEC_ID_H264; break;
-+ codec_id = AV_CODEC_ID_H264; break;
+- codec_id = CODEC_ID_H264;
++ codec_id = AV_CODEC_ID_H264;
+ break;
#ifdef HAS_HEVC
- case GPAC_OTI_VIDEO_HEVC:
- codec_id = AV_CODEC_ID_HEVC; break;
-@@ -1256,10 +1256,10 @@ static u32 FFDEC_CanHandleStream(GF_Base
+ case GPAC_OTI_VIDEO_HEVC:
+@@ -1302,11 +1302,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
case GPAC_OTI_VIDEO_MPEG2_HIGH:
case GPAC_OTI_VIDEO_MPEG2_422:
-- codec_id = CODEC_ID_MPEG2VIDEO; break;
-+ codec_id = AV_CODEC_ID_MPEG2VIDEO; break;
+- codec_id = CODEC_ID_MPEG2VIDEO;
++ codec_id = AV_CODEC_ID_MPEG2VIDEO;
+ break;
/*JPEG*/
case GPAC_OTI_IMAGE_JPEG:
- codec_id = CODEC_ID_MJPEG;
+ codec_id = AV_CODEC_ID_MJPEG;
/*return maybe supported as FFMPEG JPEG decoder has some issues with many files, so let's use it only if no
other dec is available*/
- if (avcodec_find_decoder(codec_id) != NULL)
---- a/modules/ffmpeg_in/ffmpeg_demux.c
-+++ b/modules/ffmpeg_in/ffmpeg_demux.c
+ if (avcodec_find_decoder(codec_id) != NULL)
+--- gpac.orig/modules/ffmpeg_in/ffmpeg_demux.c
++++ gpac/modules/ffmpeg_in/ffmpeg_demux.c
@@ -54,7 +54,7 @@
#endif /* AVERROR_NOFMT */
@@ -210,17 +201,8 @@ Description: Allow compilation against libav10
#define av_find_stream_info(__c) avformat_find_stream_info(__c, NULL)
#ifndef FF_API_FORMAT_PARAMETERS
-@@ -314,7 +314,7 @@ static Bool FFD_CanHandleURL(GF_InputSer
- }
-
- exit:
-- if (ctx) av_close_input_file(ctx);
-+ if (ctx) avformat_close_input(&ctx);
- return ret;
- }
-
-@@ -333,13 +333,13 @@ static GF_ESD *FFD_GetESDescriptor(FFDem
- AVCodecContext *dec = ffd->ctx->streams[ffd->audio_st]->codec;
+@@ -337,13 +337,13 @@ static GF_ESD *FFD_GetESDescriptor(FFDem
+ AVCodecContext *dec = ffd->ctx->streams[ffd->audio_st]->codec;
esd->slConfig->timestampResolution = ffd->audio_tscale.den;
switch (dec->codec_id) {
- case CODEC_ID_MP2:
@@ -236,15 +218,15 @@ Description: Allow compilation against libav10
if (!dec->extradata_size) goto opaque_audio;
esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_AAC_MPEG4;
esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
-@@ -374,25 +374,25 @@ opaque_audio:
+@@ -378,25 +378,25 @@ opaque_audio:
AVCodecContext *dec = ffd->ctx->streams[ffd->video_st]->codec;
esd->slConfig->timestampResolution = ffd->video_tscale.den;
switch (dec->codec_id) {
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
- /*there is a bug in fragmentation of raw H264 in ffmpeg, the NALU startcode (0x00000001) is split across
- two frames - we therefore force internal ffmpeg codec ID to avoid NALU size recompute
- at the decoder level*/
+ /*there is a bug in fragmentation of raw H264 in ffmpeg, the NALU startcode (0x00000001) is split across
+ two frames - we therefore force internal ffmpeg codec ID to avoid NALU size recompute
+ at the decoder level*/
-// case CODEC_ID_H264:
+// case AV_CODEC_ID_H264:
/*if dsi not detected force use ffmpeg*/
@@ -255,8 +237,8 @@ Description: Allow compilation against libav10
esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
esd->decoderConfig->decoderSpecificInfo->data = gf_malloc(sizeof(char)*dec->extradata_size);
memcpy(esd->decoderConfig->decoderSpecificInfo->data,
- dec->extradata,
- sizeof(char)*dec->extradata_size);
+ dec->extradata,
+ sizeof(char)*dec->extradata_size);
break;
- case CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
@@ -267,7 +249,7 @@ Description: Allow compilation against libav10
esd->decoderConfig->objectTypeIndication = GPAC_OTI_VIDEO_MPEG2_422;
break;
default:
-@@ -590,11 +590,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
+@@ -594,11 +594,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
}
/*setup downloader*/
av_in->flags |= AVFMT_NOFILE;
@@ -279,30 +261,3 @@ Description: Allow compilation against libav10
}
} else {
res = open_file(&ffd->ctx, szName, av_in);
-@@ -673,7 +669,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
-
- ffd->seekable = (av_seek_frame(ffd->ctx, -1, 0, AVSEEK_FLAG_BACKWARD)<0) ? 0 : 1;
- if (!ffd->seekable) {
-- av_close_input_file(ffd->ctx);
-+ avformat_close_input(&ffd->ctx);
- ffd->ctx = NULL;
- open_file(&ffd->ctx, szName, av_in);
- av_find_stream_info(ffd->ctx);
-@@ -688,7 +684,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
-
- err_exit:
- GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMPEG] Error opening file %s: %s\n", url, gf_error_to_string(e)));
-- if (ffd->ctx) av_close_input_file(ffd->ctx);
-+ if (ffd->ctx) avformat_close_input(&ffd->ctx);
- ffd->ctx = NULL;
- gf_term_on_connect(serv, NULL, e);
- return GF_OK;
-@@ -742,7 +738,7 @@ static GF_Err FFD_CloseService(GF_InputS
-
- ffd->is_running = 0;
-
-- if (ffd->ctx) av_close_input_file(ffd->ctx);
-+ if (ffd->ctx) avformat_close_input(&ffd->ctx);
- ffd->ctx = NULL;
- ffd->audio_ch = ffd->video_ch = NULL;
- ffd->audio_run = ffd->video_run = 0;
--
gpac packaging
More information about the pkg-multimedia-commits
mailing list