From: Malcolm Priestley <tvboxspy@gmail.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH RFC 2/2] app: kaffeine: Fix missing PCR on stream recordings.
Date: Sun, 9 Jul 2017 10:43:51 +0100 [thread overview]
Message-ID: <20170709094351.14642-2-tvboxspy@gmail.com> (raw)
In-Reply-To: <20170709094351.14642-1-tvboxspy@gmail.com>
The ISO/IEC standard 13818-1 or ITU-T Rec. H.222.0 standard allow transport
vendors to place PCR (Program Clock Reference) on a different PID.
This patch adds it recording to file.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
src/dvb/dvbrecording.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/dvb/dvbrecording.cpp b/src/dvb/dvbrecording.cpp
index ecb4777..12a57dc 100644
--- a/src/dvb/dvbrecording.cpp
+++ b/src/dvb/dvbrecording.cpp
@@ -961,6 +961,7 @@ void DvbRecordingFile::pmtSectionChanged(const QByteArray &pmtSectionData_)
pmtSectionData = pmtSectionData_;
DvbPmtSection pmtSection(pmtSectionData);
DvbPmtParser pmtParser(pmtSection);
+ int pcr_pid = pmtSection.pcr_pid();
QSet<int> newPids;
if (pmtParser.videoPid != -1) {
@@ -979,6 +980,13 @@ void DvbRecordingFile::pmtSectionChanged(const QByteArray &pmtSectionData_)
newPids.insert(pmtParser.teletextPid);
}
+ /* check PCR PID is set */
+ if (pcr_pid != 0x1fff) {
+ /* Check not already in list */
+ if (!newPids.contains(pcr_pid))
+ newPids.insert(pcr_pid);
+ }
+
for (int i = 0; i < pids.size(); ++i) {
int pid = pids.at(i);
--
2.13.2
next prev parent reply other threads:[~2017-07-09 9:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 9:43 [PATCH RFC 1/2] app: kaffeine: Fix missing PCR on live streams Malcolm Priestley
2017-07-09 9:43 ` Malcolm Priestley [this message]
2017-07-09 11:14 ` Mauro Carvalho Chehab
2017-07-09 12:11 ` Malcolm Priestley
2017-07-10 12:38 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170709094351.14642-2-tvboxspy@gmail.com \
--to=tvboxspy@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@s-opensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox