Beispiel #1
0
static void
_show_sub_path(MPLS_SUB *sub, int level)
{
    int ii;

    indent_printf(level+1, "Type: %d (%s)", sub->type, _lookup_str(subpath_type_map, sub->type));
    indent_printf(level+1, "Repeat: %d", sub->is_repeat);
    indent_printf(level+1, "Sub playitem count: %d", sub->sub_playitem_count);

    for (ii = 0; ii < sub->sub_playitem_count; ii++) {
        MPLS_SUB_PI *pi;

        pi = &sub->sub_play_item[ii];

        if (verbose) {
            indent_printf(level+1, "Sub playitem %d", ii);
            indent_printf(level+2, "Clip Id %s", pi->clip[0].clip_id);
            indent_printf(level+2, "Multi clip: %d", pi->is_multi_clip);
            indent_printf(level+2, "Clip count: %d", pi->clip_count);
            indent_printf(level+2, "Connection Condition: %s (%02x)",
                          _lookup_str(connection_type_map, pi->connection_condition),
                          pi->connection_condition);
            indent_printf(level+2, "In-Time: %d", pi->in_time);
            indent_printf(level+2, "Out-Time: %d", pi->out_time);
            indent_printf(level+2, "Sync playitem Id: %d", pi->sync_play_item_id);
            indent_printf(level+2, "Sync PTS: %d", pi->sync_pts);
        } else {
            indent_printf(level+1, "%s.m2ts", pi->clip[0].clip_id);
        }
    }
}
Beispiel #2
0
static void
_show_clip_info(CLPI_CL *cl, int level)
{
    CLPI_CLIP_INFO *ci = &cl->clip;
    int ii;

    indent_printf(level, "Clip Info");
    indent_printf(level+1, "Clip Stream Type: %02x", ci->clip_stream_type);
    indent_printf(level+1, "Clip Application Type (%02x): %s",
                  ci->application_type, _lookup_str(application_type_map, ci->application_type));
    indent_printf(level+1, "is_ATC_delta: %s", ci->is_atc_delta ? "True" : "False");
    indent_printf(level+1, "ATC delta count: %d", ci->atc_delta_count);
    indent_printf(level+1, "TS Recording Rate: %u", ci->ts_recording_rate);
    indent_printf(level+1, "Number Source Packets: %u", ci->num_source_packets);
    // Show ts type info
    indent_printf(level+1, "TS Type Info");
    indent_printf(level+2, "Validity Flags %02x", ci->ts_type_info.validity);
    indent_printf(level+2, "Format Id %s", ci->ts_type_info.format_id);
    // Show cc5 thing
    for (ii = 0; ii < ci->atc_delta_count; ii++) {
        indent_printf(level+1, "ATC delta[ %d ]", ii);
        indent_printf(level+2, "Delta %08x", ci->atc_delta[ii].delta);
        indent_printf(level+2, "File Id %s", ci->atc_delta[ii].file_id);
        indent_printf(level+2, "File Code %s", ci->atc_delta[ii].file_code);
    }
    // show fonts
    if (cl->font_info.font_count) {
        indent_printf(level+1, "Font files");
        for (ii = 0; ii < cl->font_info.font_count; ii++) {
            indent_printf(level+2, "Font file %d: %s.otf", ii+1, cl->font_info.font[ii].file_id);
        }
    }

    printf("\n");
}
Beispiel #3
0
static void
_show_ai(MPLS_PL *pl, int level)
{
    indent_printf(level, "Playback type: %s (%d)",
                  _lookup_str(playback_type_map, pl->app_info.playback_type),
                  pl->app_info.playback_type);
    if (pl->app_info.playback_type == 2 || pl->app_info.playback_type == 3) {
        indent_printf(level+1, "Playback count: %d", pl->app_info.playback_count);
    }
}
Beispiel #4
0
static void
_show_stream(CLPI_PROG_STREAM *ss, int level)
{
    indent_printf(level, "Codec (%04x): %s", ss->coding_type,
                    _lookup_str(codec_map, ss->coding_type));
    indent_printf(level, "PID: %04x", ss->pid);
    switch (ss->coding_type) {
        case 0x01:
        case 0x02:
        case 0xea:
        case 0x1b:
        case 0x20:
            indent_printf(level, "Format %02x: %s", ss->format,
                        _lookup_str(video_format_map, ss->format));
            indent_printf(level, "Rate %02x: %s", ss->rate,
                        _lookup_str(video_rate_map, ss->rate));
            indent_printf(level, "Aspect %02x: %s", ss->aspect,
                        _lookup_str(video_aspect_map, ss->aspect));
            indent_printf(level, "oc_flag %02x", ss->oc_flag);
            break;

        case 0x03:
        case 0x04:
        case 0x80:
        case 0x81:
        case 0x82:
        case 0x83:
        case 0x84:
        case 0x85:
        case 0x86:
        case 0xa1:
        case 0xa2:
            indent_printf(level, "Format %02x: %s", ss->format,
                        _lookup_str(audio_format_map, ss->format));
            indent_printf(level, "Rate %02x: %s", ss->rate,
                        _lookup_str(audio_rate_map, ss->rate));
            indent_printf(level, "Language: %s", ss->lang);
            break;

        case 0x90:
        case 0x91:
        case 0xa0:
            indent_printf(level, "Language: %s", ss->lang);
            break;

        case 0x92:
            indent_printf(level, "Char Code: %02x", ss->char_code);
            indent_printf(level, "Language: %s", ss->lang);
            break;

        default:
            fprintf(stderr, "unrecognized coding type %02x\n", ss->coding_type);
            break;
    };
}
Beispiel #5
0
static void
_show_details(MPLS_PL *pl, int level)
{
    int ii, jj, kk;

    for (ii = 0; ii < pl->list_count; ii++) {
        MPLS_PI *pi;

        pi = &pl->play_item[ii];
        indent_printf(level, "Clip Id %s", pi->clip[0].clip_id);
        indent_printf(level+1, "Stc Id: %02x", pi->clip[0].stc_id);
        indent_printf(level+1, "Connection Condition: %s (%02x)",
                      _lookup_str(connection_type_map, pi->connection_condition),
                      pi->connection_condition);
        indent_printf(level+1, "In-Time: %d", pi->in_time);
        indent_printf(level+1, "Out-Time: %d", pi->out_time);
        if (pi->still_mode == 1) {
            indent_printf(level+1, "Still time: %ds\n", pi->still_time);
        }
        if (pi->still_mode == 2) {
            indent_printf(level+1, "Still time: infinite\n");
        }
        if (pi->angle_count > 1) {
            for (jj = 1; jj < pi->angle_count; jj++) {
                indent_printf(level+1, "Angle %d:", jj);
                indent_printf(level+2, "Clip Id %s", pi->clip[jj].clip_id);
                indent_printf(level+2, "Stc Id: %02x", pi->clip[jj].stc_id);
            }
        }
        for (jj = 0; jj < pi->stn.num_video; jj++) {
            indent_printf(level+1, "Video Stream %d:", jj);
            _show_stream(&pi->stn.video[jj], level + 2);
        }
        for (jj = 0; jj < pi->stn.num_audio; jj++) {
            indent_printf(level+1, "Audio Stream %d:", jj);
            _show_stream(&pi->stn.audio[jj], level + 2);
        }
        for (jj = 0; jj < pi->stn.num_ig; jj++) {
            indent_printf(level+1, "Interactive Graphics Stream %d:", jj);
            _show_stream(&pi->stn.ig[jj], level + 2);
        }
        for (jj = 0; jj < (pi->stn.num_pg + pi->stn.num_pip_pg); jj++) {
            if (jj < pi->stn.num_pg) {
               indent_printf(level+1, "Presentation Graphics Stream %d:", jj);
            } else {
                indent_printf(level+1, "PIP Presentation Graphics Stream %d:", jj);
            }
            _show_stream(&pi->stn.pg[jj], level + 2);
        }
        for (jj = 0; jj < pi->stn.num_secondary_video; jj++) {
            indent_printf(level+1, "Secondary Video Stream %d:", jj);
            _show_stream(&pi->stn.secondary_video[jj], level + 2);
            for (kk = 0; kk < pi->stn.secondary_video[jj].sv_num_secondary_audio_ref; kk++) {
                indent_printf(level+2, "Secondary Audio Ref %d: %d", kk,pi->stn.secondary_video[jj].sv_secondary_audio_ref[kk]);
            }
            for (kk = 0; kk < pi->stn.secondary_video[jj].sv_num_pip_pg_ref; kk++) {
                indent_printf(level+2, "PIP Presentation Graphic Ref %d: %d", kk,pi->stn.secondary_video[jj].sv_pip_pg_ref[kk]);
            }
        }
        for (jj = 0; jj < pi->stn.num_secondary_audio; jj++) {
            indent_printf(level+1, "Secondary Audio Stream %d:", jj);
            _show_stream(&pi->stn.secondary_audio[jj], level + 2);
            for (kk = 0; kk < pi->stn.secondary_audio[jj].sa_num_primary_audio_ref; kk++) {
                indent_printf(level+2, "Primary Audio Ref %d: %d", kk,pi->stn.secondary_audio[jj].sa_primary_audio_ref[kk]);
            }
        }
        printf("\n");
    }
}
Beispiel #6
0
static void
_show_stream(MPLS_STREAM *ss, int level)
{
    indent_printf(level, "Codec (%04x): %s", ss->coding_type,
                    _lookup_str(codec_map, ss->coding_type));
    switch (ss->stream_type) {
        case 1:
            indent_printf(level, "PID: %04x", ss->pid);
            break;

        case 2:
        case 4:
            indent_printf(level, "SubPath Id: %02x", ss->subpath_id);
            indent_printf(level, "SubClip Id: %02x", ss->subclip_id);
            indent_printf(level, "PID: %04x", ss->pid);
            break;

        case 3:
            indent_printf(level, "SubPath Id: %02x", ss->subpath_id);
            indent_printf(level, "PID: %04x", ss->pid);
            break;

        default:
            fprintf(stderr, "unrecognized stream type %02x\n", ss->stream_type);
            break;
    };

    switch (ss->coding_type) {
        case 0x01:
        case 0x02:
        case 0xea:
        case 0x1b:
            indent_printf(level, "Format %02x: %s", ss->format,
                        _lookup_str(video_format_map, ss->format));
            indent_printf(level, "Rate %02x: %s", ss->rate,
                        _lookup_str(video_rate_map, ss->rate));
            break;

        case 0x03:
        case 0x04:
        case 0x80:
        case 0x81:
        case 0x82:
        case 0x83:
        case 0x84:
        case 0x85:
        case 0x86:
        case 0xa1:
        case 0xa2:
            indent_printf(level, "Format %02x: %s", ss->format,
                        _lookup_str(audio_format_map, ss->format));
            indent_printf(level, "Rate %02x: %s", ss->rate,
                        _lookup_str(audio_rate_map, ss->rate));
            indent_printf(level, "Language: %s", ss->lang);
            break;

        case 0x90:
        case 0x91:
            indent_printf(level, "Language: %s", ss->lang);
            break;

        case 0x92:
            indent_printf(level, "Char Code: %02x", ss->char_code);
            indent_printf(level, "Language: %s", ss->lang);
            break;

        default:
            fprintf(stderr, "unrecognized coding type %02x\n", ss->coding_type);
            break;
    };
}