summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-06-13 18:41:23 +0000
committerjbrjake <[email protected]>2007-06-13 18:41:23 +0000
commit29ee70dd4a1adce5f35a26ab353c9268f7b3e476 (patch)
treef3c561b4a649848ae71e54a6b87840699190f6f4 /libhb
parente9b8e1da6a114eec2c07bdbab7c0fbb0de76ca78 (diff)
Finally recommitting clee's patch from r518 to allow 64-bit mp4 files that can hold more than 4 gigs... controlled by a boolean called job->largeFileSize and enabled from the cli with -4 or --large-file. Note that this breaks compatibility with stuff like the iPod, AppleTV, PS3 (I think), etc...so it is off by default.
Also converted a few stray hard tabs into soft tabs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@618 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.h24
-rw-r--r--libhb/muxmp4.c13
2 files changed, 26 insertions, 11 deletions
diff --git a/libhb/common.h b/libhb/common.h
index 116f99a93..a6ea8ac95 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -142,10 +142,10 @@ struct hb_job_s
vbitrate: output bitrate (kbps)
pass: 0, 1 or 2
vrate, vrate_base: output framerate is vrate / vrate_base
- h264_level: boolean for whether or not we're encoding for iPod
- crf: boolean for whether to use constant rate factor with x264
- x264opts: string of extra x264 options
- areBframes: boolean to note if b-frames are included in x264opts */
+ h264_level: boolean for whether or not we're encoding for iPod
+ crf: boolean for whether to use constant rate factor with x264
+ x264opts: string of extra x264 options
+ areBframes: boolean to note if b-frames are included in x264opts */
#define HB_VCODEC_MASK 0x0000FF
#define HB_VCODEC_FFMPEG 0x000001
#define HB_VCODEC_XVID 0x000002
@@ -158,15 +158,15 @@ struct hb_job_s
int vrate_base;
int pass;
int h264_13;
- int h264_level;
- int crf;
- char *x264opts;
- int areBframes;
-
+ int h264_level;
+ int crf;
+ char *x264opts;
+ int areBframes;
+
/* Audio tracks:
audios: Indexes in hb_title_t's audios list, starting from 0.
-1 indicates the end of the list
- audio_mixdowns: The mixdown to be used for each audio track in audios[] */
+ audio_mixdowns: The mixdown to be used for each audio track in audios[] */
/* define some masks, used to extract the various information from the HB_AMIXDOWN_XXXX values */
#define HB_AMIXDOWN_DCA_FORMAT_MASK 0x00FFF000
@@ -245,6 +245,10 @@ struct hb_job_s
int mux;
const char * file;
+ /* Allow MP4 files > 4 gigs */
+ int largeFileSize;
+
+
int subtitle_scan;
hb_subtitle_t ** select_subtitle;
char * native_language;
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index cfaf11ebb..c70e2c114 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -143,7 +143,18 @@ static int MP4Init( hb_mux_object_t * m )
/* Create an empty mp4 file */
- m->file = MP4Create( job->file, MP4_DETAILS_ERROR, 0 );
+ if (job->largeFileSize)
+ /* Use 64-bit MP4 file */
+ {
+ m->file = MP4Create( job->file, MP4_DETAILS_ERROR, MP4_CREATE_64BIT_DATA );
+ hb_log("Using 64-bit MP4 formatting.");
+ }
+ else
+ /* Limit MP4s to less than 4 GB */
+ {
+ m->file = MP4Create( job->file, MP4_DETAILS_ERROR, 0 );
+ }
+
if (m->file == MP4_INVALID_FILE_HANDLE)
{
hb_log("muxmp4.c: MP4Create failed!");