Changeset 40322 for titan/libeplayer3/main
- Timestamp:
- 04/17/17 22:27:46 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/libeplayer3/main/exteplayer.c
r39876 r40322 39 39 40 40 extern int ffmpeg_av_dict_set(const char *key, const char *value, int flags); 41 extern void aac_software_decoder_set(const int32_t val); 42 extern void dts_software_decoder_set(const int32_t val); 43 extern void wma_software_decoder_set(const int32_t val); 44 extern void ac3_software_decoder_set(const int32_t val); 45 extern void eac3_software_decoder_set(const int32_t val); 46 extern void mp3_software_decoder_set(const int32_t val); 47 extern void rtmp_proto_impl_set(const int32_t val); 41 extern void aac_software_decoder_set(const int32_t val); 42 extern void aac_latm_software_decoder_set(const int32_t val); 43 extern void dts_software_decoder_set(const int32_t val); 44 extern void wma_software_decoder_set(const int32_t val); 45 extern void ac3_software_decoder_set(const int32_t val); 46 extern void eac3_software_decoder_set(const int32_t val); 47 extern void mp3_software_decoder_set(const int32_t val); 48 extern void rtmp_proto_impl_set(const int32_t val); 49 extern void flv2mpeg4_converter_set(const int32_t val); 48 50 49 51 extern void pcm_resampling_set(int32_t val); 50 52 extern void stereo_software_decoder_set(int32_t val); 51 53 extern void insert_pcm_as_lpcm_set(int32_t val); 52 extern void progressive_ download_set(int32_t val);54 extern void progressive_playback_set(int32_t val); 53 55 54 56 extern OutputHandler_t OutputHandler; … … 275 277 int aopt = 0, bopt = 0; 276 278 char *copt = 0, *dopt = 0; 277 while ( (c = getopt(argc, argv, "w ae3dlsrimvn:x:u:c:h:o:p:t:9:")) != -1)279 while ( (c = getopt(argc, argv, "we3dlsrimva:n:x:u:c:h:o:p:t:9:0:1:4:f:")) != -1) 278 280 { 279 281 switch (c) 280 282 { 281 283 case 'a': 284 { 285 int flag = atoi(optarg); 282 286 printf("Software decoder will be used for AAC codec\n"); 283 aac_software_decoder_set(1); 284 break; 287 aac_software_decoder_set(flag & 0x01); 288 aac_latm_software_decoder_set(flag & 0x02); 289 break; 290 } 285 291 case 'e': 286 292 printf("Software decoder will be used for EAC3 codec\n"); … … 317 323 case 'o': 318 324 printf("Set progressive download to %d\n", atoi(optarg)); 319 progressive_ download_set(atoi(optarg));325 progressive_playback_set(atoi(optarg)); 320 326 break; 321 327 case 'p': … … 354 360 rtmp_proto_impl_set(atoi(optarg)); 355 361 break; 362 case '0': 363 ffmpeg_av_dict_set("video_rep_index", optarg, 0); 364 break; 365 case '1': 366 ffmpeg_av_dict_set("audio_rep_index", optarg, 0); 367 break; 368 case '4': 369 #ifdef HAVE_FLV2MPEG4_CONVERTER 370 flv2mpeg4_converter_set(atoi(optarg)); 371 #endif 372 break; 373 case 'f': 374 { 375 char *ffopt = strdup(optarg); 376 char *ffval = strchr(ffopt, '='); 377 if (ffval) 378 { 379 *ffval = '\0'; 380 ffval += 1; 381 ffmpeg_av_dict_set(ffopt, ffval, 0); 382 } 383 free(ffopt); 384 break; 385 } 356 386 default: 357 387 printf ("?? getopt returned character code 0%o ??\n", c); … … 395 425 int commandRetVal = -1; 396 426 /* inform client that we can handle additional commands */ 397 fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 3 0);427 fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 34); 398 428 399 429 if (0 != ParseParams(argc, argv, file, audioFile, &audioTrackIdx, &subtitleTrackIdx)) 400 430 { 401 431 printf("Usage: exteplayer3 filePath [-u user-agent] [-c cookies] [-h headers] [-p prio] [-a] [-d] [-w] [-l] [-s] [-i] [-t audioTrackId] [-9 subtitleTrackId] [-x separateAudioUri] plabackUri\n"); 402 printf("[-a ] AAC software decoding\n");432 printf("[-a 0|1|2|3] AAC software decoding - 1 bit - AAC ADTS, 2 - bit AAC LATM\n"); 403 433 printf("[-e] EAC3 software decoding\n"); 404 434 printf("[-3] AC3 software decoding\n"); … … 408 438 printf("[-l] software decoder use LPCM for injection (otherwise wav PCM will be used)\n"); 409 439 printf("[-s] software decoding as stereo [downmix]\n"); 440 #ifdef HAVE_FLV2MPEG4_CONVERTER 441 printf("[-4 0|1] - disable/enable flv2mpeg4 converter\n"); 442 #endif 410 443 printf("[-i] play in infinity loop\n"); 411 444 printf("[-v] switch to live TS stream mode\n"); … … 419 452 printf("[-c cookies] set cookies - not working at now, please use -h instead\n"); 420 453 printf("[-x separateAudioUri]\n"); 454 printf("[-0 idx] video MPEG-DASH representation index\n"); 455 printf("[-1 idx] audio MPEG-DASH representation index\n"); 456 printf("[-f ffopt=ffval] any other ffmpeg option\n"); 421 457 422 458 exit(1); … … 436 472 437 473 // make sure to kill myself when parent dies 438 //prctl(PR_SET_PDEATHSIG, SIGKILL);439 440 //SetBuffering();474 prctl(PR_SET_PDEATHSIG, SIGKILL); 475 476 SetBuffering(); 441 477 442 478 //Registrating output devices … … 560 596 if( 1 == sscanf(argvBuff+1, "%d", &flags) ) 561 597 { 562 progressive_ download_set(flags);598 progressive_playback_set(flags); 563 599 fprintf(stderr, "{\"PROGRESSIVE_DOWNLOAD\":{\"flags\":%d, \"sts\":0}}\n", flags); 564 600 }
Note: See TracChangeset
for help on using the changeset viewer.