Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: media/formats/mp2t/es_parser_h264.cc

Issue 149153002: MSE: Add StreamParser buffer remuxing utility and tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments from PS4 Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/formats/mp2t/es_parser_adts.cc ('k') | media/formats/mp3/mp3_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/es_parser_h264.cc
diff --git a/media/formats/mp2t/es_parser_h264.cc b/media/formats/mp2t/es_parser_h264.cc
index 3a834a783d39427962d8cf6e1e49bc8168f0ba0a..b685c84885a7079c877d8e93a3a41ff87854b3a9 100644
--- a/media/formats/mp2t/es_parser_h264.cc
+++ b/media/formats/mp2t/es_parser_h264.cc
@@ -248,11 +248,16 @@ bool EsParserH264::EmitFrameIfNeeded(int next_aud_pos) {
const uint8* raw_es;
es_byte_queue_.Peek(&raw_es, &raw_es_size);
int access_unit_size = next_aud_pos - current_access_unit_pos_;
+
+ // TODO(wolenetz/acolwell): Validate and use a common cross-parser TrackId
+ // type and allow multiple video tracks. See https://crbug.com/341581.
scoped_refptr<StreamParserBuffer> stream_parser_buffer =
StreamParserBuffer::CopyFrom(
&raw_es[current_access_unit_pos_],
access_unit_size,
- is_key_frame_);
+ is_key_frame_,
+ DemuxerStream::VIDEO,
+ 0);
stream_parser_buffer->SetDecodeTimestamp(current_timing_desc.dts);
stream_parser_buffer->set_timestamp(current_timing_desc.pts);
emit_buffer_cb_.Run(stream_parser_buffer);
« no previous file with comments | « media/formats/mp2t/es_parser_adts.cc ('k') | media/formats/mp3/mp3_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698