Cleanup ProgramMapTableWriter
Change-Id: I08093a0fc35dc15a20f6e72166ed46d3ab94b334
This commit is contained in:
parent
2a2493ec2e
commit
79a54d7748
|
@ -255,6 +255,7 @@ void WritePmtWithParameters(uint8_t stream_type,
|
||||||
ProgramMapTableWriter::ProgramMapTableWriter(Codec codec) : codec_(codec) {}
|
ProgramMapTableWriter::ProgramMapTableWriter(Codec codec) : codec_(codec) {}
|
||||||
|
|
||||||
bool ProgramMapTableWriter::EncryptedSegmentPmt(BufferWriter* writer) {
|
bool ProgramMapTableWriter::EncryptedSegmentPmt(BufferWriter* writer) {
|
||||||
|
if (encrypted_pmt_.Size() == 0) {
|
||||||
uint8_t stream_type;
|
uint8_t stream_type;
|
||||||
switch (codec_) {
|
switch (codec_) {
|
||||||
case kCodecH264:
|
case kCodecH264:
|
||||||
|
@ -268,7 +269,6 @@ bool ProgramMapTableWriter::EncryptedSegmentPmt(BufferWriter* writer) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encrypted_pmt_.Size() == 0) {
|
|
||||||
BufferWriter descriptors;
|
BufferWriter descriptors;
|
||||||
if (!WriteDescriptors(&descriptors))
|
if (!WriteDescriptors(&descriptors))
|
||||||
return false;
|
return false;
|
||||||
|
@ -285,6 +285,7 @@ bool ProgramMapTableWriter::EncryptedSegmentPmt(BufferWriter* writer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProgramMapTableWriter::ClearSegmentPmt(BufferWriter* writer) {
|
bool ProgramMapTableWriter::ClearSegmentPmt(BufferWriter* writer) {
|
||||||
|
if (clear_pmt_.Size() == 0) {
|
||||||
uint8_t stream_type;
|
uint8_t stream_type;
|
||||||
switch (codec_) {
|
switch (codec_) {
|
||||||
case kCodecH264:
|
case kCodecH264:
|
||||||
|
@ -298,7 +299,6 @@ bool ProgramMapTableWriter::ClearSegmentPmt(BufferWriter* writer) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clear_pmt_.Size() == 0) {
|
|
||||||
WritePmtWithParameters(stream_type, kVersion0, kCurrent, nullptr, 0,
|
WritePmtWithParameters(stream_type, kVersion0, kCurrent, nullptr, 0,
|
||||||
&clear_pmt_);
|
&clear_pmt_);
|
||||||
DCHECK_NE(clear_pmt_.Size(), 0u);
|
DCHECK_NE(clear_pmt_.Size(), 0u);
|
||||||
|
|
Loading…
Reference in New Issue