Changeset 41347 for titan/titan/player.h
- Timestamp:
- 12/03/17 19:11:47 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/player.h
r41345 r41347 1268 1268 // if(ostrcmp(getconfig("av_ac3mode", NULL), "downmix") == 0) 1269 1269 #ifndef MIPSEL 1270 printf("status.downmix; %d\n", status.downmix); 1271 1272 1270 int tmpdownmix = 0; 1273 1271 char* downmix = readfiletomem(getconfig("ac3dev", NULL), 1); 1274 printf("ac3dev: %s\n",getconfig("ac3dev", NULL)); 1275 printf("downmix: %s\n",downmix); 1272 // printf("ac3dev: %s\n",getconfig("ac3dev", NULL)); 1273 debug(150, "ac3dev %s\n", getconfig("ac3dev", NULL)); 1274 1275 // printf("downmix: %s\n",downmix); 1276 debug(150, "downmix %s\n", downmix); 1277 1276 1278 if(ostrcmp(downmix, "passthrough") == 0) 1277 status.downmix = 0;1279 tmpdownmix = 0; 1278 1280 else 1279 status.downmix = 1; 1280 1281 printf("status.downmix: %d\n",status.downmix); 1282 sleep(5); 1283 if(status.downmix == 1) 1281 tmpdownmix = 1; 1282 1283 free(downmix), downmix == NULL; 1284 if(tmpdownmix != status.downmix) 1285 debug(150, "change downmix %d to %d\n", status.downmix, tmpdownmix); 1286 1287 1288 // printf("status.downmix: %d\n",status.downmix); 1289 debug(150, "status.downmix %d\n", status.downmix); 1290 1291 if(tmpdownmix == 1) 1284 1292 { 1293 debug(150, "enable dts downmix\n"); 1285 1294 dts_software_decoder_set(1); 1286 1295 stereo_software_decoder_set(1); … … 3671 3680 player->container->selectedContainer->Command(player, CONTAINER_GET_SUBTEXT, (void*)&tmpstr); 3672 3681 3673 3674 //duration = oregex(".*([0-9]{8,8}.*[0-9]{4,4}).*", subtext); 3675 //duration = oregex(".*duration=(.*);.*", subtext); 3676 3677 char* duration = oregex(".*duration=(.*);pts=.*", tmpstr); 3678 printf("[TITAN/getsubtext] duration %s\n", duration); 3679 if(duration != NULL) 3680 { 3681 printf("[TITAN/getsubtext] duration %d\n", atoi(duration)); 3682 duration_ms = atoi(duration); 3683 } 3684 3685 char* pts = oregex(".*;pts=(.*);trackid=.*", tmpstr); 3686 printf("[TITAN/getsubtext] pts %s\n", pts); 3687 if(pts != NULL) 3688 printf("[TITAN/getsubtext] pts %d\n", atoi(pts)); 3689 3690 char* trackid = oregex(".*;trackid=(.*);trackid=.*", tmpstr); 3691 printf("[TITAN/getsubtext] trackid %s\n", trackid); 3692 if(trackid != NULL) 3693 printf("[TITAN/getsubtext] trackid %d\n", atoi(trackid)); 3694 3695 subtext = oregex(".*;subtext=(.*).*", tmpstr); 3696 printf("[TITAN/getsubtext] subtext %s\n", subtext); 3682 char* duration = oregex(".*duration=(.*);pts=.*", tmpstr); 3683 // printf("[TITAN/getsubtext] duration %s\n", duration); 3684 debug(150, "duration %s\n", duration); 3685 3686 if(duration != NULL) 3687 { 3688 // printf("[TITAN/getsubtext] duration %d\n", atoi(duration)); 3689 debug(150, "duration %d\n", atoi(duration)); 3690 duration_ms = atoi(duration); 3691 } 3692 3693 char* pts = oregex(".*;pts=(.*);trackid=.*", tmpstr); 3694 // printf("[TITAN/getsubtext] pts %s\n", pts); 3695 debug(150, "pts %s\n", pts); 3696 3697 if(pts != NULL) 3698 printf("[TITAN/getsubtext] pts %d\n", atoi(pts)); 3699 3700 char* trackid = oregex(".*;trackid=(.*);trackid=.*", tmpstr); 3701 // printf("[TITAN/getsubtext] trackid %s\n", trackid); 3702 debug(150, "trackid %s\n", trackid); 3703 3704 if(trackid != NULL) 3705 printf("[TITAN/getsubtext] trackid %d\n", atoi(trackid)); 3706 3707 subtext = oregex(".*;subtext=(.*).*", tmpstr); 3708 printf("[TITAN/getsubtext] subtext %s\n", subtext); 3697 3709 3698 3710 if(subtitlethread == NULL) … … 3700 3712 3701 3713 3702 /*3703 duration=3704 duration=", ollutoa(tmpduration), 0, 1);3705 tmpstr = ostrcat(tmpstr, ";pts=", 1, 0);;3706 tmpstr = ostrcat(tmpstr, ollutoa(tmppts), 1, 0);;3707 tmpstr = ostrcat(tmpstr, ";trackid=", 1, 0);;3708 tmpstr = ostrcat(tmpstr, ollutoa(tmptrackId), 1, 0);3709 tmpstr = ostrcat(tmpstr, ";subtext=", 1, 0);;3710 tmpstr = ostrcat(tmpstr, subtext, 1, 0);3711 3712 running_pts = pos / 11111LL;3713 decoder_ms = running_pts / 90;3714 3715 if(subtitlethread == NULL)3716 subtitlethread = addtimer(&playersubtitle_thread, START, 10000, 1, NULL, NULL, NULL);3717 3718 */3719 /*3720 SubtitleOut_t *data;3721 printf("[TITAN/getsubtext start]\n");3722 if(player && player->container && player->container->selectedContainer)3723 // player->container->selectedContainer->Command(player, CONTAINER_GET_SUBTEXT, (void*)&data);3724 player->container->selectedContainer->Command(player, CONTAINER_GET_SUBTEXT, (void*)data);3725 3726 if (data == NULL)3727 return NULL;3728 printf("[TITAN/getsubtext] 2\n");3729 3730 printf("data.data: %s\n", &data->data);3731 3732 printf("data.data: %s\n", data->data);3733 printf("data.pts: %lld\n", data->pts);3734 printf("data.duration: %lld\n", data->durationMS);3735 3736 SubtitleOut_t *data;3737 printf("111111111111111\n");3738 3739 3740 if(player && player->container && player->container->selectedContainer)3741 player->container->selectedContainer->Command(player, CONTAINER_GET_SUBTEXT, (void*)data);3742 // player->container->selectedContainer->Command(player, CONTAINER_GET_SUBTEXT, (void*)data);3743 3744 printf("222222222222222\n");3745 3746 if (data == NULL)3747 return NULL;3748 printf("-------------------------------------\n");3749 3750 printf("titan &data.data %s\n", (char*)&data->data);3751 3752 SubtitleOut_t *out = NULL;3753 printf("333333333333333\n");3754 3755 out = (SubtitleOut_t*) data;3756 printf("444444444444444\n");3757 3758 printf("out.duration: %lld\n", out->durationMS);3759 printf("555555555555555\n");3760 */3761 /*3762 printf(out->pts);3763 printf("444444444444444\n");3764 3765 printf(out->data);3766 printf("444444444444444\n");3767 3768 3769 printf("out.pts: %u\n", out->pts);3770 printf("out1.data: %u\n", out->data);3771 printf("out2.data: %d\n", out->data);3772 3773 3774 char *Encoding = NULL;3775 printf("Encoding:%s Text:%s Len:%d\n", Encoding, (char*) out->data, out->len);3776 printf("555555555555555\n");3777 printf("-------------------------------------\n");3778 3779 printf("data.pts: %lld\n", data->pts);3780 printf("data.durationMS: %lld\n", data->durationMS);3781 printf("data1: %lld\n", data->data);3782 printf("data2: %d\n", data->data);3783 printf("data3: %s\n", data->data);3784 printf("data4: %s\n", (char*)data->data);3785 printf("data5: %s\n", (char*)data->data);3786 printf("-------------------------------------\n");3787 3788 */3789 /*3790 struct skin* framebuffer = getscreen("framebuffer");3791 struct skin* subtitle = getscreen("gstsubtitle");3792 3793 // changetext(subtitle, (char*) data->data);3794 changetext(subtitle, subtext);3795 drawscreen(subtitle, 0, 0);3796 */3797 3714 return subtext; 3798 3715 }
Note: See TracChangeset
for help on using the changeset viewer.