From 7a618b70594231821291b9ac9753853e57c03346 Mon Sep 17 00:00:00 2001
From: shawn king <slackerlinux85@gmail.com>
Date: Fri, 7 Jan 2011 13:14:12 +1000
Subject: [PATCH 1/3] Add access to subtitle_header in avformatdecoder
---
mythtv/libs/libmythtv/avformatdecoder.cpp | 9 +++++++++
mythtv/libs/libmythtv/avformatdecoder.h | 1 +
mythtv/libs/libmythtv/decoderbase.h | 1 +
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 3689fcc..621b8bb 100644
a
|
b
|
QString AvFormatDecoder::GetXDS(const QString &key) const |
3323 | 3323 | return ccd608->GetXDS(key); |
3324 | 3324 | } |
3325 | 3325 | |
| 3326 | QByteArray AvFormatDecoder::GetSubHeader(uint trackNo) const |
| 3327 | { |
| 3328 | if (trackNo >= tracks[kTrackTypeSubtitle].size()) |
| 3329 | return QByteArray(); |
| 3330 | |
| 3331 | return QByteArray((char *)ic->streams[tracks[kTrackTypeSubtitle][trackNo].av_stream_index]->codec->subtitle_header, |
| 3332 | ic->streams[tracks[kTrackTypeSubtitle][trackNo].av_stream_index]->codec->subtitle_header_size); |
| 3333 | } |
| 3334 | |
3326 | 3335 | bool AvFormatDecoder::SetAudioByComponentTag(int tag) |
3327 | 3336 | { |
3328 | 3337 | for (uint i = 0; i < tracks[kTrackTypeAudio].size(); i++) |
diff --git a/mythtv/libs/libmythtv/avformatdecoder.h b/mythtv/libs/libmythtv/avformatdecoder.h
index 7aae8b0..0d04a44 100644
a
|
b
|
class AvFormatDecoder : public DecoderBase |
161 | 161 | virtual int GetTeletextDecoderType(void) const; |
162 | 162 | |
163 | 163 | virtual QString GetXDS(const QString&) const; |
| 164 | virtual QByteArray GetSubHeader(uint trackNo) const; |
164 | 165 | |
165 | 166 | // MHEG stuff |
166 | 167 | virtual bool SetAudioByComponentTag(int tag); |
diff --git a/mythtv/libs/libmythtv/decoderbase.h b/mythtv/libs/libmythtv/decoderbase.h
index 79f7df8..3f8061a 100644
a
|
b
|
class DecoderBase |
190 | 190 | virtual int GetTeletextDecoderType(void) const { return -1; } |
191 | 191 | |
192 | 192 | virtual QString GetXDS(const QString&) const { return QString::null; } |
| 193 | virtual QByteArray GetSubHeader(uint trackNo) const { return QByteArray(); } |
193 | 194 | |
194 | 195 | // MHEG/MHI stuff |
195 | 196 | virtual bool SetAudioByComponentTag(int) { return false; } |