~ubuntu-branches/debian/experimental/gpac/experimental

« back to all changes in this revision

Viewing changes to applications/mp4box/main.c

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-04-06 11:00:34 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120406110034-fjb8ak5zb7vg8s91
Tags: 0.4.5+svn4002~dfsg0-1
* Merge with upstream snapshot svn4002.
* Bump SONAME.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
#endif 
108
108
 
109
109
 
110
 
#ifndef GPAC_DISABLE_STREAMING
 
110
#if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
111
111
void PrintStreamerUsage();
112
112
int stream_file_rtp(int argc, char **argv);
113
113
int live_session(int argc, char **argv);
823
823
 
824
824
#endif /*GPAC_DISABLE_ISOM_HINTING*/
825
825
 
826
 
#ifndef GPAC_DISABLE_ISOM_WRITE
 
826
#if !defined(GPAC_DISABLE_ISOM_WRITE) && !defined(GPAC_DISABLE_AV_PARSERS)
827
827
 
828
828
static void check_media_profile(GF_ISOFile *file, u32 track)
829
829
{
913
913
        gf_isom_set_pl_indication(file, GF_ISOM_PL_INLINE, 0);
914
914
}
915
915
 
916
 
#endif
 
916
#endif /*!defined(GPAC_DISABLE_ISOM_WRITE) && !defined(GPAC_DISABLE_AV_PARSERS)*/
917
917
 
918
918
/*return value:
919
919
        0: not supported 
1204
1204
#ifndef GPAC_DISABLE_SCENE_ENCODER
1205
1205
        GF_SMEncodeOptions opts;
1206
1206
#endif
1207
 
#ifndef GPAC_DISABLE_STREAMING
 
1207
#if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
1208
1208
        SDPLine sdp_lines[MAX_CUMUL_OPS];
1209
1209
#endif
1210
1210
        Double InterleavingTime, split_duration, split_start, import_fps, dash_duration;
1386
1386
                        i++;
1387
1387
                }
1388
1388
#endif /*GPAC_DISABLE_MEDIA_EXPORT*/
1389
 
 
1390
 
#ifndef GPAC_DISABLE_STREAMING
 
1389
#if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
1391
1390
                else if (!stricmp(arg, "-rtp")) {
1392
1391
                        stream_rtp = 1;
1393
1392
                }
1394
 
#endif
1395
1393
                else if (!stricmp(arg, "-live")) {
1396
1394
                        live_scene = 1;
1397
1395
                }
 
1396
#endif
1398
1397
                else if (!stricmp(arg, "-diod")) {
1399
1398
                        dump_iod = 1;
1400
1399
                }
1590
1589
                else if (!stricmp(arg, "-mtu")) { CHECK_NEXT_ARG MTUSize = atoi(argv[i+1]); i++; }
1591
1590
                else if (!stricmp(arg, "-cardur")) { CHECK_NEXT_ARG car_dur = atoi(argv[i+1]); i++; }
1592
1591
                else if (!stricmp(arg, "-rate")) { CHECK_NEXT_ARG rtp_rate = atoi(argv[i+1]); i++; }
 
1592
#ifndef GPAC_DISABLE_SENG
1593
1593
                else if (!stricmp(arg, "-add-sdp") || !stricmp(arg, "-sdp_ex")) {
1594
1594
                        char *id;
1595
1595
                        CHECK_NEXT_ARG
1616
1616
                        nb_sdp_ex++;
1617
1617
                        i++;
1618
1618
                }
 
1619
#endif /*GPAC_DISABLE_SENG*/
1619
1620
#endif /*GPAC_DISABLE_ISOM_HINTING*/
1620
1621
 
1621
1622
                else if (!stricmp(arg, "-single")) {
2100
2101
                        else if (!strcmp(argv[i+1], "crypt")) PrintEncryptUsage();
2101
2102
                        else if (!strcmp(argv[i+1], "meta")) PrintMetaUsage();
2102
2103
                        else if (!strcmp(argv[i+1], "swf")) PrintSWFUsage();
2103
 
#ifndef GPAC_DISABLE_STREAMING
 
2104
#if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
2104
2105
                        else if (!strcmp(argv[i+1], "rtp")) PrintStreamerUsage();
2105
2106
                        else if (!strcmp(argv[i+1], "live")) PrintLiveUsage     ();
2106
2107
#endif
2115
2116
                                PrintEncryptUsage();
2116
2117
                                PrintMetaUsage();
2117
2118
                                PrintSWFUsage();
2118
 
#ifndef GPAC_DISABLE_STREAMING
 
2119
#if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
2119
2120
                                PrintStreamerUsage();
2120
2121
                                PrintLiveUsage  ();
2121
2122
#endif
2140
2141
                return 1;
2141
2142
        }
2142
2143
 
2143
 
#ifndef GPAC_DISABLE_STREAMING
 
2144
#if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
2144
2145
        if (live_scene) {
2145
2146
                return live_session(argc, argv);
2146
2147
        }
2147
2148
        if (stream_rtp) {
2148
2149
                return stream_file_rtp(argc, argv);
2149
2150
        }
2150
 
#endif /*GPAC_DISABLE_STREAMING*/
 
2151
#endif
2151
2152
 
2152
2153
        if (raw_cat) {
2153
2154
                char chunk[4096];
2786
2787
        }
2787
2788
 
2788
2789
        if (remove_sys_tracks) {
 
2790
#ifndef GPAC_DISABLE_AV_PARSERS
2789
2791
                remove_systems_tracks(file);
 
2792
#endif
2790
2793
                needSave = 1;
2791
2794
                if (conv_type < GF_ISOM_CONV_TYPE_ISMA_EX) conv_type = 0;
2792
2795
        }
3215
3218
                                                        u32 k, l, sps_id1, sps_id2;
3216
3219
                                                        GF_AVCConfig *avccfg1 = gf_isom_avc_config_get(in, j+1, 1);
3217
3220
                                                        GF_AVCConfig *avccfg2 = gf_isom_avc_config_get(init_seg, track, 1);
 
3221
#ifndef GPAC_DISABLE_AV_PARSERS
3218
3222
                                                        for (k=0; k<gf_list_count(avccfg2->sequenceParameterSets); k++) {
3219
3223
                                                                GF_AVCConfigSlot *slc = gf_list_get(avccfg2->sequenceParameterSets, k);
3220
3224
                                                                gf_avc_get_sps_info(slc->data, slc->size, &sps_id1, NULL, NULL, NULL, NULL);
3227
3231
                                                                        }
3228
3232
                                                                }
3229
3233
                                                        }
 
3234
#endif
3230
3235
                                                        /*no conflicts in SPS ids, merge all SPS in a single sample desc*/
3231
3236
                                                        if (do_merge) {
3232
3237
                                                                while (gf_list_count(avccfg1->sequenceParameterSets)) {
3363
3368
        }
3364
3369
        if (e) goto err_exit;
3365
3370
 
3366
 
#ifndef GPAC_DISABLE_ISOM_HINTING
 
3371
#if !defined(GPAC_DISABLE_ISOM_HINTING) && !defined(GPAC_DISABLE_SENG)
3367
3372
        for (i=0; i<nb_sdp_ex; i++) {
3368
3373
                if (sdp_lines[i].trackID) {
3369
3374
                        u32 track = gf_isom_get_track_by_id(file, sdp_lines[i].trackID);
3392
3397
                        needSave = 1;
3393
3398
                }
3394
3399
        }
3395
 
#endif /*GPAC_DISABLE_ISOM_HINTING*/
 
3400
#endif /*!defined(GPAC_DISABLE_ISOM_HINTING) && !defined(GPAC_DISABLE_SENG)*/
3396
3401
 
3397
3402
        if (cprt) {
3398
3403
                e = gf_isom_set_copyright(file, "und", cprt);