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

Issue 399433003: Mpeg2 TS - Fail when no valid timestamp in the ADTS parser. (Closed)

Created:
6 years, 5 months ago by damienv1
Modified:
6 years, 4 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Mpeg2 TS - Fail when no valid timestamp in the ADTS parser. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289944

Patch Set 1 #

Patch Set 2 : #

Total comments: 5

Patch Set 3 : Add a baseline ADTS parser unit test. #

Total comments: 11

Patch Set 4 : Add an helper class for ES parser unit tests. #

Patch Set 5 : Add missing files. #

Patch Set 6 : #

Patch Set 7 : Update ComputePacketSize prototype. #

Total comments: 17

Patch Set 8 : Address some of the nits. #

Patch Set 9 : Adding missing MEDIA_EXPORT needed by unit tests. #

Patch Set 10 : #

Total comments: 2

Patch Set 11 : ES parser test base. #

Patch Set 12 : #

Total comments: 15

Patch Set 13 : Fix comments from patch set #12. #

Total comments: 7

Patch Set 14 : Rebase #

Patch Set 15 : Fix rebase: do not set dts in adts parser. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+389 lines, -138 lines) Patch
M media/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M media/formats/mp2t/es_parser_adts.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M media/formats/mp2t/es_parser_adts.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -1 line 0 comments Download
A media/formats/mp2t/es_parser_adts_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +86 lines, -0 lines 0 comments Download
M media/formats/mp2t/es_parser_h264_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +96 lines, -136 lines 0 comments Download
A media/formats/mp2t/es_parser_test_base.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +85 lines, -0 lines 0 comments Download
A media/formats/mp2t/es_parser_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +108 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
damienv1
PTAL, thanks.
6 years, 5 months ago (2014-07-15 18:49:23 UTC) #1
wolenetz
A couple questions. I would also like to see some test(s) that would show the ...
6 years, 5 months ago (2014-07-15 19:57:43 UTC) #2
damienv1
https://codereview.chromium.org/399433003/diff/20001/media/formats/mp2t/es_parser_adts.cc File media/formats/mp2t/es_parser_adts.cc (right): https://codereview.chromium.org/399433003/diff/20001/media/formats/mp2t/es_parser_adts.cc#newcode148 media/formats/mp2t/es_parser_adts.cc:148: while (!pts_list_.empty() && On 2014/07/15 19:57:42, wolenetz wrote: > ...
6 years, 5 months ago (2014-07-15 21:27:00 UTC) #3
wolenetz
Thanks for adding tests. Looking pretty good, just some test cleanup and thoroughness comments/nits: https://codereview.chromium.org/399433003/diff/20001/media/formats/mp2t/es_parser_adts.cc ...
6 years, 5 months ago (2014-07-15 21:59:57 UTC) #4
damienv1
https://codereview.chromium.org/399433003/diff/40001/media/formats/mp2t/es_parser_adts_unittest.cc File media/formats/mp2t/es_parser_adts_unittest.cc (right): https://codereview.chromium.org/399433003/diff/40001/media/formats/mp2t/es_parser_adts_unittest.cc#newcode27 media/formats/mp2t/es_parser_adts_unittest.cc:27: struct Packet { On 2014/07/15 21:59:57, wolenetz wrote: > ...
6 years, 5 months ago (2014-07-15 22:22:40 UTC) #5
wolenetz
https://codereview.chromium.org/399433003/diff/40001/media/formats/mp2t/es_parser_adts_unittest.cc File media/formats/mp2t/es_parser_adts_unittest.cc (right): https://codereview.chromium.org/399433003/diff/40001/media/formats/mp2t/es_parser_adts_unittest.cc#newcode40 media/formats/mp2t/es_parser_adts_unittest.cc:40: void ComputePacketSize(std::vector<Packet>& packets, size_t stream_size) { On 2014/07/15 22:22:40, ...
6 years, 5 months ago (2014-07-15 22:39:21 UTC) #6
wolenetz
Mostly just nits left. Thanks for breaking out the common code from the two test ...
6 years, 5 months ago (2014-07-16 00:21:04 UTC) #7
wolenetz
On 2014/07/16 00:21:04, wolenetz wrote: > Mostly just nits left. Thanks for breaking out the ...
6 years, 5 months ago (2014-07-16 00:26:07 UTC) #8
wolenetz
Damien - it looks like the android bots fail compile in PS7, like: ../../media/formats/mp2t/es_parser_adts_unittest.cc:84:18:error: 'class ...
6 years, 5 months ago (2014-07-16 00:28:33 UTC) #9
wolenetz
One more nit... https://codereview.chromium.org/399433003/diff/110001/media/formats/mp2t/es_parser_test_helper.h File media/formats/mp2t/es_parser_test_helper.h (right): https://codereview.chromium.org/399433003/diff/110001/media/formats/mp2t/es_parser_test_helper.h#newcode31 media/formats/mp2t/es_parser_test_helper.h:31: void ComputePacketSize(std::vector<Packet>* packets, size_t stream_size); nit: ...
6 years, 5 months ago (2014-07-16 00:32:28 UTC) #10
damienv1
https://codereview.chromium.org/399433003/diff/110001/media/formats/mp2t/es_parser_test_helper.cc File media/formats/mp2t/es_parser_test_helper.cc (right): https://codereview.chromium.org/399433003/diff/110001/media/formats/mp2t/es_parser_test_helper.cc#newcode16 media/formats/mp2t/es_parser_test_helper.cc:16: size(0u) { On 2014/07/16 00:21:03, wolenetz wrote: > I'm ...
6 years, 5 months ago (2014-07-16 02:34:34 UTC) #11
acolwell GONE FROM CHROMIUM
On 2014/07/16 00:26:07, wolenetz wrote: > acolwell@: For common test helpers, is convention to use ...
6 years, 5 months ago (2014-07-16 17:11:54 UTC) #12
wolenetz
Just a few nits, though I concur with acolwell's recommendation to restructure the helper into ...
6 years, 5 months ago (2014-07-16 20:35:31 UTC) #13
damienv1
No need to review patch set #11 (at best, just look at it at a ...
6 years, 5 months ago (2014-07-18 01:04:43 UTC) #14
damienv1
PTAL. Thanks.
6 years, 4 months ago (2014-08-06 18:57:18 UTC) #15
damienv1
Ping on this. Thanks !
6 years, 4 months ago (2014-08-14 15:39:20 UTC) #16
acolwell GONE FROM CHROMIUM
lgtm https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_h264_unittest.cc File media/formats/mp2t/es_parser_h264_unittest.cc (right): https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_h264_unittest.cc#newcode138 media/formats/mp2t/es_parser_h264_unittest.cc:138: void EsParserH264Test::GetPesTimestamps(std::vector<Packet>& pes_packets) { nit: This should probably ...
6 years, 4 months ago (2014-08-14 17:45:48 UTC) #17
wolenetz
+dalecurtis@ for src/media/BUILD.gn lgtm % nits: https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_adts.cc File media/formats/mp2t/es_parser_adts.cc (right): https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_adts.cc#newcode158 media/formats/mp2t/es_parser_adts.cc:158: base::TimeDelta current_pts = ...
6 years, 4 months ago (2014-08-14 18:46:29 UTC) #18
damienv1
https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_adts.cc File media/formats/mp2t/es_parser_adts.cc (right): https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_adts.cc#newcode158 media/formats/mp2t/es_parser_adts.cc:158: base::TimeDelta current_pts = audio_timestamp_helper_->GetTimestamp(); On 2014/08/14 18:46:29, wolenetz wrote: ...
6 years, 4 months ago (2014-08-14 22:31:22 UTC) #19
DaleCurtis
gn changes lgtm
6 years, 4 months ago (2014-08-14 22:40:53 UTC) #20
wolenetz
lgtm % nits and bots applying patch :) https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_adts.cc File media/formats/mp2t/es_parser_adts.cc (right): https://codereview.chromium.org/399433003/diff/210001/media/formats/mp2t/es_parser_adts.cc#newcode158 media/formats/mp2t/es_parser_adts.cc:158: base::TimeDelta ...
6 years, 4 months ago (2014-08-14 23:13:54 UTC) #21
damienv1
https://codereview.chromium.org/399433003/diff/230001/media/formats/mp2t/es_parser_h264_unittest.cc File media/formats/mp2t/es_parser_h264_unittest.cc (right): https://codereview.chromium.org/399433003/diff/230001/media/formats/mp2t/es_parser_h264_unittest.cc#newcode134 media/formats/mp2t/es_parser_h264_unittest.cc:134: const std::vector<Packet>& pes_packets = *pes_packets_ptr; On 2014/08/14 23:13:53, wolenetz ...
6 years, 4 months ago (2014-08-14 23:30:03 UTC) #22
wolenetz
https://codereview.chromium.org/399433003/diff/230001/media/formats/mp2t/es_parser_h264_unittest.cc File media/formats/mp2t/es_parser_h264_unittest.cc (right): https://codereview.chromium.org/399433003/diff/230001/media/formats/mp2t/es_parser_h264_unittest.cc#newcode142 media/formats/mp2t/es_parser_h264_unittest.cc:142: (*pes_packets_ptr)[k].pts = base::TimeDelta::FromMilliseconds(-1); On 2014/08/14 23:30:03, damienv1 wrote: > ...
6 years, 4 months ago (2014-08-14 23:39:54 UTC) #23
damienv1
The CQ bit was checked by damienv@chromium.org
6 years, 4 months ago (2014-08-15 15:04:35 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/damienv@chromium.org/399433003/270001
6 years, 4 months ago (2014-08-15 15:06:48 UTC) #25
commit-bot: I haz the power
Committed patchset #15 (270001) as 289944
6 years, 4 months ago (2014-08-15 18:26:01 UTC) #26
robertshield
6 years, 4 months ago (2014-08-18 02:17:47 UTC) #27
Message was sent while issue was closed.
On 2014/08/15 18:26:01, I haz the power (commit-bot) wrote:
> Committed patchset #15 (270001) as 289944

Hello!

Syncing to head gives me a build failure that is, I think, caused by this patch:

[4/46] CXX obj\media\formats\mp2t\media.es_parser_adts.obj
FAILED: ninja -t msvc -e environment.x86 -- "C:\depot_tools\win_toolchain\vs2013
_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\media\formats\mp2
t\media.es_parser_adts.obj.rsp /c ..\..\media\formats\mp2t\es_parser_adts.cc /Fo
obj\media\formats\mp2t\media.es_parser_adts.obj /Fdobj\media\media.cc.pdb
d:\src\chromium\src\media\formats\mp2t\es_parser_adts.h(29) : error C2220: warni
ng treated as error - no 'object' file generated
d:\src\chromium\src\media\formats\mp2t\es_parser_adts.h(29) : warning C4275: non
 dll-interface class 'media::mp2t::EsParser' used as base for dll-interface clas
s 'media::mp2t::EsParserAdts'
        d:\src\chromium\src\media\formats\mp2t\es_parser.h(20) : see declaration
 of 'media::mp2t::EsParser'
        d:\src\chromium\src\media\formats\mp2t\es_parser_adts.h(29) : see declar
ation of 'media::mp2t::EsParserAdts'
[4/46] CXX obj\media\formats\mp2t\media.mp2t_stream_parser.obj
FAILED: ninja -t msvc -e environment.x86 -- "C:\depot_tools\win_toolchain\vs2013
_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\media\formats\mp2
t\media.mp2t_stream_parser.obj.rsp /c ..\..\media\formats\mp2t\mp2t_stream_parse
r.cc /Foobj\media\formats\mp2t\media.mp2t_stream_parser.obj /Fdobj\media\media.c
c.pdb
d:\src\chromium\src\media\formats\mp2t\es_parser_adts.h(29) : error C2220: warni
ng treated as error - no 'object' file generated
d:\src\chromium\src\media\formats\mp2t\es_parser_adts.h(29) : warning C4275: non
 dll-interface class 'media::mp2t::EsParser' used as base for dll-interface clas
s 'media::mp2t::EsParserAdts'
        d:\src\chromium\src\media\formats\mp2t\es_parser.h(20) : see declaration
 of 'media::mp2t::EsParser'
        d:\src\chromium\src\media\formats\mp2t\es_parser_adts.h(29) : see declar
ation of 'media::mp2t::EsParserAdts'
ninja: build stopped: subcommand failed.


I am building a Debug component build. I found that the following patch allows
compilation to complete:

diff --git a/media/formats/mp2t/es_parser.h b/media/formats/mp2t/es_parser.h
index 96785ea..1519e73 100644
--- a/media/formats/mp2t/es_parser.h
+++ b/media/formats/mp2t/es_parser.h
@@ -17,7 +17,7 @@ class StreamParserBuffer;

 namespace mp2t {

-class EsParser {
+class MEDIA_EXPORT EsParser {
  public:
   typedef base::Callback<void(scoped_refptr<StreamParserBuffer>)> EmitBufferCB;


I'm pretty unfamiliar with this code though and don't know if the above is
correct. Also none of the waterfall bots seem affected, which is odd. 

In any case, could we either revert or fix the compilation error? Thanks!

Powered by Google App Engine
This is Rietveld 408576698