mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 11:53:25 +00:00
Removing global options from Mp4
This commit is contained in:
parent
fa3b651ee1
commit
b4f5b5b98e
@ -10,6 +10,7 @@ License: GPL 2.0
|
||||
#include <signal.h>
|
||||
#include "ffmpeg_intgr.h"
|
||||
#include "ccx_common_option.h"
|
||||
#include "ccx_mp4.h"
|
||||
|
||||
struct lib_ccx_ctx *signal_ctx;
|
||||
void sigint_handler()
|
||||
@ -564,6 +565,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
switch (ctx->stream_mode)
|
||||
{
|
||||
struct ccx_s_mp4Cfg mp4_cfg = {ccx_options.mp4vidtrack};
|
||||
case CCX_SM_ELEMENTARY_OR_NOT_FOUND:
|
||||
if (!ccx_options.use_gop_as_pts) // If !0 then the user selected something
|
||||
ccx_options.use_gop_as_pts = 1; // Force GOP timing for ES
|
||||
@ -590,10 +592,12 @@ int main(int argc, char *argv[])
|
||||
show_myth_banner = 1;
|
||||
myth_loop(ctx, &enc_ctx);
|
||||
break;
|
||||
case CCX_SM_MP4:
|
||||
case CCX_SM_MP4:
|
||||
mprint ("\rAnalyzing data with GPAC (MP4 library)\n");
|
||||
close_input_file(ctx); // No need to have it open. GPAC will do it for us
|
||||
processmp4 (ctx, ctx->inputfile[0],&enc_ctx);
|
||||
processmp4 (ctx, &mp4_cfg, ctx->inputfile[0],&enc_ctx);
|
||||
if (ccx_options.print_file_reports)
|
||||
print_file_report(ctx);
|
||||
break;
|
||||
#ifdef WTV_DEBUG
|
||||
case CCX_SM_HEX_DUMP:
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "utility.h"
|
||||
#include "ccx_encoders_common.h"
|
||||
#include "ccx_common_option.h"
|
||||
#include "ccx_mp4.h"
|
||||
|
||||
void do_NAL (struct lib_ccx_ctx *ctx, unsigned char *NALstart, LLONG NAL_length, struct cc_subtitle *sub);
|
||||
void set_fts(void); // From timing.c
|
||||
@ -279,7 +280,7 @@ unsigned char * ccdp_find_data(unsigned char * ccdp_atom_content, unsigned int l
|
||||
}
|
||||
|
||||
*/
|
||||
int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx)
|
||||
int processmp4 (struct lib_ccx_ctx *ctx,struct ccx_s_mp4Cfg *cfg, char *file,void *enc_ctx)
|
||||
{
|
||||
GF_ISOFile* f;
|
||||
u32 i, j, track_count, avc_track_count, cc_track_count;
|
||||
@ -328,7 +329,7 @@ int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx)
|
||||
|
||||
if ( type == GF_ISOM_MEDIA_VISUAL && subtype == GF_ISOM_SUBTYPE_XDVB)
|
||||
{
|
||||
if (cc_track_count && !ccx_options.mp4vidtrack)
|
||||
if (cc_track_count && !cfg->mp4vidtrack)
|
||||
continue;
|
||||
if(process_xdvb_track(ctx, file, f, i + 1, &dec_sub) != 0)
|
||||
{
|
||||
@ -344,7 +345,7 @@ int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx)
|
||||
|
||||
if( type == GF_ISOM_MEDIA_VISUAL && subtype == GF_ISOM_SUBTYPE_AVC_H264)
|
||||
{
|
||||
if (cc_track_count && !ccx_options.mp4vidtrack)
|
||||
if (cc_track_count && !cfg->mp4vidtrack)
|
||||
continue;
|
||||
GF_AVCConfig *cnf = gf_isom_avc_config_get(f,i+1,1);
|
||||
if (cnf!=NULL)
|
||||
@ -372,7 +373,7 @@ int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx)
|
||||
if (type == GF_ISOM_MEDIA_CAPTIONS &&
|
||||
(subtype == GF_ISOM_SUBTYPE_C608 || subtype == GF_ISOM_SUBTYPE_C708))
|
||||
{
|
||||
if (avc_track_count && ccx_options.mp4vidtrack)
|
||||
if (avc_track_count && cfg->mp4vidtrack)
|
||||
continue;
|
||||
|
||||
#ifdef MP4_DEBUG
|
||||
@ -550,8 +551,6 @@ int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx)
|
||||
mprint ("found no dedicated CC track(s).\n");
|
||||
|
||||
ctx->freport.mp4_cc_track_cnt = cc_track_count;
|
||||
if (ccx_options.print_file_reports)
|
||||
print_file_report(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
11
src/lib_ccx/ccx_mp4.h
Normal file
11
src/lib_ccx/ccx_mp4.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef CXX_MP4_H
|
||||
#define CXX_MP4_H
|
||||
|
||||
|
||||
struct ccx_s_mp4Cfg
|
||||
{
|
||||
unsigned int mp4vidtrack :1;
|
||||
};
|
||||
|
||||
int processmp4 (struct lib_ccx_ctx *ctx,struct ccx_s_mp4Cfg *cfg, char *file,void *enc_ctx);
|
||||
#endif
|
@ -335,8 +335,6 @@ void store_hdcc(struct lib_ccx_ctx *ctx, unsigned char *cc_data, int cc_count, i
|
||||
LLONG current_fts_now,struct cc_subtitle *sub);
|
||||
void anchor_hdcc(int seq);
|
||||
void process_hdcc (struct lib_ccx_ctx *ctx, struct cc_subtitle *sub);
|
||||
// mp4.c
|
||||
int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx);
|
||||
|
||||
// params_dump.c
|
||||
void params_dump(struct lib_ccx_ctx *ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user