From gitlab at videolan.org Thu Nov 21 08:56:01 2024 From: gitlab at videolan.org (Jean-Paul Saman (@jpsaman)) Date: Thu, 21 Nov 2024 09:56:01 +0100 Subject: [libdvbpsi-devel] [Git][videolan/libdvbpsi][master] Update .gitlab-ci.yml file Message-ID: <673ef5a14977d_2b114f21dcc9d828629e5@gitlab.mail> Jean-Paul Saman pushed to branch master at VideoLAN / libdvbpsi Commits: fb582273 by Jean-Paul Saman at 2024-11-21T08:55:55+00:00 Update .gitlab-ci.yml file - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -28,7 +28,7 @@ build-debian: build-macos: extends: .build-common tags: - - catalina + - monterey - amd64 script: - autoreconf -fisv View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/fb582273bc91d1b299f37b5a330ce46d301e60cb -- View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/fb582273bc91d1b299f37b5a330ce46d301e60cb You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance From gitlab at videolan.org Thu Nov 21 10:30:44 2024 From: gitlab at videolan.org (Jean-Paul Saman (@jpsaman)) Date: Thu, 21 Nov 2024 11:30:44 +0100 Subject: [libdvbpsi-devel] [Git][videolan/libdvbpsi][master] dr_65.h: fix header guard Message-ID: <673f0bd4f0f41_2b114f1c0ab65029252f7@gitlab.mail> Jean-Paul Saman pushed to branch master at VideoLAN / libdvbpsi Commits: 4004c75e by Jean-Paul Saman at 2024-11-21T11:10:30+01:00 dr_65.h: fix header guard - - - - - 1 changed file: - src/descriptors/dvb/dr_65.h Changes: ===================================== src/descriptors/dvb/dr_65.h ===================================== @@ -28,7 +28,7 @@ */ #ifndef _DR_65_H -#define _DR_66_H +#define _DR_65_H /***************************************************************************** * dvbpsi_dvb_scrambling_dr_s View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/4004c75e9dd2832f32f3996ee94a5cda7edfb187 -- View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/4004c75e9dd2832f32f3996ee94a5cda7edfb187 You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance From gitlab at videolan.org Thu Nov 21 11:35:07 2024 From: gitlab at videolan.org (Jean-Paul Saman (@jpsaman)) Date: Thu, 21 Nov 2024 12:35:07 +0100 Subject: [libdvbpsi-devel] [Git][videolan/libdvbpsi][master] dr_7c.c: use reallocated memory Message-ID: <673f1aeb9ea55_2b114f21dd304429374a7@gitlab.mail> Jean-Paul Saman pushed to branch master at VideoLAN / libdvbpsi Commits: 4b159072 by Jean-Paul Saman at 2024-11-21T10:46:04+00:00 dr_7c.c: use reallocated memory - - - - - 1 changed file: - src/descriptors/dvb/dr_7c.c Changes: ===================================== src/descriptors/dvb/dr_7c.c ===================================== @@ -259,6 +259,7 @@ dvbpsi_dvb_aac_dr_t *dvbpsi_decode_dvb_aac_dr(dvbpsi_descriptor_t *p_descriptor) free(p_decoded); return NULL; } + p_decoded = p_tmp; p_decoded->p_additional_info = ((uint8_t*)p_tmp + sizeof(dvbpsi_dvb_aac_dr_t)); p_decoded->i_additional_info_length = i_info_length; View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/4b159072824f5af898cb0b8ceaf9fe6f7a029780 -- View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/4b159072824f5af898cb0b8ceaf9fe6f7a029780 You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance From gitlab at videolan.org Thu Nov 21 11:55:57 2024 From: gitlab at videolan.org (Jean-Paul Saman (@jpsaman)) Date: Thu, 21 Nov 2024 12:55:57 +0100 Subject: [libdvbpsi-devel] [Git][videolan/libdvbpsi][master] sis.c: use proper indentation otherwise it may be misleading Message-ID: <673f1fcd489b4_2b114f22eea9e0294301c@gitlab.mail> Jean-Paul Saman pushed to branch master at VideoLAN / libdvbpsi Commits: 5c8a61e0 by Jean-Paul Saman at 2024-11-21T12:41:54+01:00 sis.c: use proper indentation otherwise it may be misleading - - - - - 1 changed file: - src/tables/sis.c Changes: ===================================== src/tables/sis.c ===================================== @@ -852,7 +852,7 @@ void dvbpsi_sis_sections_decode(dvbpsi_t* p_dvbpsi, dvbpsi_sis_t* p_sis, if (!p_sis->p_splice_command) dvbpsi_error(p_dvbpsi, "SIS decoder", "time_signal command is invalid"); - break; + break; case 0x07: /* bandwidth_reservation */ break; default: View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/5c8a61e03a8dc6d4489800b1e91e9d37485b5bcf -- View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/5c8a61e03a8dc6d4489800b1e91e9d37485b5bcf You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance From gitlab at videolan.org Thu Nov 21 12:02:35 2024 From: gitlab at videolan.org (Jean-Paul Saman (@jpsaman)) Date: Thu, 21 Nov 2024 13:02:35 +0100 Subject: [libdvbpsi-devel] [Git][videolan/libdvbpsi][master] dvbpsi_private.h: correct dvbpsi_message() prototype Message-ID: <673f215b7adff_2b114f2339e90029442a4@gitlab.mail> Jean-Paul Saman pushed to branch master at VideoLAN / libdvbpsi Commits: 89b53ce7 by Jean-Paul Saman at 2024-11-21T12:59:23+01:00 dvbpsi_private.h: correct dvbpsi_message() prototype - - - - - 1 changed file: - src/dvbpsi_private.h Changes: ===================================== src/dvbpsi_private.h ===================================== @@ -1,7 +1,7 @@ /***************************************************************************** * dvbpsi_private.h: main private header *---------------------------------------------------------------------------- - * Copyright (C) 2001-2012 VideoLAN + * Copyright (C) 2001-2024 VideoLAN * $Id$ * * Authors: Arnaud de Bossoreille de Ribou @@ -40,7 +40,7 @@ *****************************************************************************/ #ifdef HAVE_VARIADIC_MACROS -void dvbpsi_message(dvbpsi_t *dvbpsi, const int level, const char *fmt, ...); +void dvbpsi_message(dvbpsi_t *dvbpsi, const dvbpsi_msg_level_t level, const char *fmt, ...); # define dvbpsi_error(hnd, src, str, x...) \ dvbpsi_message(hnd, DVBPSI_MSG_ERROR, "libdvbpsi error (%s): " str, src, ##x) View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/89b53ce767f51f24bad7707ef3ddadb64a9dc383 -- View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/commit/89b53ce767f51f24bad7707ef3ddadb64a9dc383 You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance From gitlab at videolan.org Thu Nov 21 14:51:23 2024 From: gitlab at videolan.org (Jean-Paul Saman (@jpsaman)) Date: Thu, 21 Nov 2024 15:51:23 +0100 Subject: [libdvbpsi-devel] [Git][videolan/libdvbpsi][master] 3 commits: dvbinfo: correct expected continuity counter in error debug Message-ID: <673f48eb86f87_2b114f2392c1d82983747@gitlab.mail> Jean-Paul Saman pushed to branch master at VideoLAN / libdvbpsi Commits: 5a8890e9 by Jean-Paul Saman at 2024-11-21T13:30:39+01:00 dvbinfo: correct expected continuity counter in error debug - - - - - 1e1c50df by Jean-Paul Saman at 2024-11-21T13:30:39+01:00 dvbinfo.c: use a summary file only when requested - - - - - d5d72168 by Jean-Paul Saman at 2024-11-21T14:47:58+01:00 dvbinfo: add some details on PAT/PMT in summary - - - - - 2 changed files: - examples/dvbinfo/dvbinfo.c - examples/dvbinfo/libdvbpsi.c Changes: ===================================== examples/dvbinfo/dvbinfo.c ===================================== @@ -353,6 +353,33 @@ static void *dvbinfo_capture(void *data) return NULL; } +static void dvbinfo_write_summary_file(const char *psz_temp, dvbinfo_capture_t *capture, ts_stream_t *stream) +{ + params_t *param = capture->params; + + FILE *fd = fd = fopen(psz_temp, "w+"); + if (!fd) + { + libdvbpsi_log(param, DVBINFO_LOG_ERROR, + "failed opening summary file (disabling summary logging)\n"); + param->b_summary = false; + } + else + { + libdvbpsi_summary(fd, stream, param->summary.mode); + fflush(fd); + fclose(fd); + unlink(param->summary.file); /* remove 'old' file */ + int ret = rename(psz_temp, param->summary.file); + if (ret < 0) + { + libdvbpsi_log(param, DVBINFO_LOG_ERROR, + "failed renming summary file (disabling summary logging)\n"); + param->b_summary = false; + } + } +} + static int dvbinfo_process(dvbinfo_capture_t *capture) { int err = -1; @@ -364,7 +391,7 @@ static int dvbinfo_process(dvbinfo_capture_t *capture) mtime_t deadline = 0; if (param->b_summary) { - if (asprintf(&psz_temp, "%s.part", param->summary.file) < 0) + if ((param->summary.file != NULL) && (asprintf(&psz_temp, "%s.part", param->summary.file) < 0)) { libdvbpsi_log(param, DVBINFO_LOG_ERROR, "Could not create temporary summary file %s\n", param->summary.file); @@ -409,33 +436,17 @@ static int dvbinfo_process(dvbinfo_capture_t *capture) b_error = true; /* summary statistics */ - if (param->b_summary) + if (param->b_summary && (mdate() >= deadline)) { - if (mdate() >= deadline) + if (psz_temp) { - FILE *fd = fopen(psz_temp, "w+"); - if (fd) - { - libdvbpsi_summary(fd, stream, param->summary.mode); - fflush(fd); - fclose(fd); - unlink(param->summary.file); - int ret = rename(psz_temp, param->summary.file); - if (ret < 0) - { - libdvbpsi_log(param, DVBINFO_LOG_ERROR, - "failed renming summary file (disabling summary logging)\n"); - param->b_summary = false; - } - } - else - { - libdvbpsi_log(param, DVBINFO_LOG_ERROR, - "failed opening summary file (disabling summary logging)\n"); - param->b_summary = false; - } - deadline = mdate() + param->summary.period; + dvbinfo_write_summary_file(psz_temp, capture, stream); + } + else + { + libdvbpsi_summary(stdout, stream, param->summary.mode); } + deadline = mdate() + param->summary.period; } /* reuse buffer */ ===================================== examples/dvbinfo/libdvbpsi.c ===================================== @@ -491,29 +491,42 @@ static void summary(FILE *fd, ts_stream_t *stream) fprintf(fd, "\n=========================================================\n"); fprintf(fd, "\nSummary: Bandwidth\n"); + fprintf(fd, "\n---------------------------------------------------------\n"); + + if (stream->pat.handle && stream->pat.pid) { + fprintf(fd, "\nFound PAT: %4d (0x%4x), version %d,", + stream->pat.pid->i_pid, stream->pat.pid->i_pid, stream->pat.i_pat_version); + + fprintf(fd, " seen %"PRId64" packets", + stream->pat.pid->i_packets); + + i_packets += stream->pat.pid->i_packets; + } + ts_pmt_t *pmt = stream->pmt; while (pmt) { /* Find PCR PID and get pcr timestamps */ - fprintf(fd, "\n---------------------------------------------------------\n"); - fprintf(fd, "\nFound PMT: %4d (0x%4x)\n", pmt->pid_pmt->i_pid, pmt->pid_pmt->i_pid); + fprintf(fd, "\nFound PMT: %4d (0x%4x),", pmt->pid_pmt->i_pid, pmt->pid_pmt->i_pid); + fprintf(fd, " seen %"PRId64" packets", pmt->pid_pmt->i_packets); + i_packets += pmt->pid_pmt->i_packets; if (!pmt->pid_pcr) { - fprintf(fd, "ERROR: PMT %4d (0x%4x) has no PCR defined\n", + fprintf(fd, "\nERROR: PMT %4d (0x%4x) has no PCR defined\n", pmt->pid_pmt->i_pid, pmt->pid_pmt->i_pid); /* Next PMT */ pmt = pmt->p_next; continue; } - fprintf(fd, "Found PCR: %4d (0x%4x)\n", pmt->pid_pcr->i_pid, pmt->pid_pcr->i_pid); + fprintf(fd, "\nFound PCR: %4d (0x%4x),", pmt->pid_pcr->i_pid, pmt->pid_pcr->i_pid); - int i_pmt_pid = pmt->pid_pcr->i_pid; - if (stream->pid[i_pmt_pid].b_pcr) + int i_pcr_pid = pmt->pid_pcr->i_pid; + if (stream->pid[i_pcr_pid].b_pcr) { - start = stream->pid[i_pmt_pid].i_first_pcr; - end = stream->pid[i_pmt_pid].i_last_pcr; - if (stream->pid[i_pmt_pid].b_discontinuity_indicator) + start = stream->pid[i_pcr_pid].i_first_pcr; + end = stream->pid[i_pcr_pid].i_last_pcr; + if (stream->pid[i_pcr_pid].b_discontinuity_indicator) { fprintf(fd, "PCR discontinuity was signalled for PID: %4d (0x%4x)\n", - i_pmt_pid, i_pmt_pid); + i_pcr_pid, i_pcr_pid); } } @@ -523,7 +536,7 @@ static void summary(FILE *fd, ts_stream_t *stream) if ((stream->pid[i_pid].pid_pmt == pmt->pid_pmt) && stream->pid[i_pid].b_seen ) { - fprintf(fd, "Found PID: %4d (0x%4x), DRM: %s,", i_pid, i_pid, + fprintf(fd, "\nFound PID: %4d (0x%4x), DRM: %s,", i_pid, i_pid, (stream->pid[i_pid].i_transport_scrambling_control != 0x00) ? "yes" : " no" ); double bitrate = 0; @@ -535,7 +548,6 @@ static void summary(FILE *fd, ts_stream_t *stream) fprintf(fd, " bitrate %0.4f kbit/s,", bitrate); fprintf(fd, " seen %"PRId64" packets", stream->pid[i_pid].i_packets); - fprintf(fd, "\n"); i_packets += stream->pid[i_pid].i_packets; if (i_first_pcr == 0) @@ -547,13 +559,15 @@ static void summary(FILE *fd, ts_stream_t *stream) } /* Print totals */ double total_bitrate = (double)(((i_packets*188) + stream->i_lost_bytes) * 8)/((double)(i_last_pcr - i_first_pcr)/1000.0); - fprintf(fd, "\nTotal bitrate %0.4f kbits/s\n", total_bitrate); + fprintf(fd, "\n\nTotal bitrate %0.4f kbits/s\n", total_bitrate); fprintf(fd, "Number of packets: %"PRId64", stuffing %"PRId64" packets, lost %"PRId64" bytes\n", i_packets, stream->i_null_packets, stream->i_lost_bytes); fprintf(fd, "PCR first: %"PRId64", last: %"PRId64", duration: %"PRId64"\n", i_first_pcr, i_last_pcr, (mtime_t)(i_last_pcr - i_first_pcr)); + fprintf(fd, "\n---------------------------------------------------------\n"); + /* Next PMT */ pmt = pmt->p_next; } @@ -3132,7 +3146,7 @@ bool libdvbpsi_process(ts_stream_t *stream, uint8_t *buf, ssize_t length, mtime_ { stream->pf_log(stream->cb_data, 2, "dvbinfo: Continuity counter discontinuity (pid %u 0x%x found %d expected %d)\n", - i_pid, i_pid, stream->pid[i_pid].i_cc, i_old_cc+1); + i_pid, i_pid, stream->pid[i_pid].i_cc, (i_old_cc+1)%16); /* Discontinuity has been handled */ b_discontinuity_seen = false; View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/compare/89b53ce767f51f24bad7707ef3ddadb64a9dc383...d5d72168117cd7a22b82435983b347ab1e2ef598 -- View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/-/compare/89b53ce767f51f24bad7707ef3ddadb64a9dc383...d5d72168117cd7a22b82435983b347ab1e2ef598 You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance