Bug 107046 - Support non-WebVTT cues from in-band text tracks
Summary: Support non-WebVTT cues from in-band text tracks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks: 43668
  Show dependency treegraph
 
Reported: 2013-01-16 13:14 PST by Eric Carlson
Modified: 2013-01-21 14:07 PST (History)
9 users (show)

See Also:


Attachments
Proposed patch (60.73 KB, patch)
2013-01-16 14:18 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Update patch for my good friend the style bot. (60.70 KB, patch)
2013-01-16 14:52 PST, Eric Carlson
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Add new files to other port build systems. (63.07 KB, patch)
2013-01-16 15:53 PST, Eric Carlson
eflews.bot: commit-queue-
Details | Formatted Diff | Diff
Another patch, another build system. (63.55 KB, patch)
2013-01-16 17:55 PST, Eric Carlson
sam: review-
Details | Formatted Diff | Diff
Updated patch. (67.49 KB, patch)
2013-01-21 13:24 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated patch. (67.44 KB, patch)
2013-01-21 13:44 PST, Eric Carlson
sam: review+
Details | Formatted Diff | Diff
One byte smaller this time. (67.44 KB, patch)
2013-01-21 13:51 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2013-01-16 13:14:57 PST
r137161 added support for in-band text tracks, and to created WebVTT cues from other types of cue. This translation is not always successful, so we should have a "generic" cue type internal to WebCore which does not use the WebVTT rendering rules.
Comment 1 Eric Carlson 2013-01-16 14:18:51 PST
Created attachment 183034 [details]
Proposed patch
Comment 2 WebKit Review Bot 2013-01-16 14:21:57 PST
Attachment 183034 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/html/track/TextTrackCueGeneric.cpp:54:  The parameter name "document" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/html/track/TextTrackCueGeneric.cpp:54:  The parameter name "cue" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:302:  An else should appear on the same line as the preceding }  [whitespace/newline] [4]
Source/WebCore/html/track/TextTrackCueGeneric.h:26:  #ifndef header guard has wrong style, please use: TextTrackCueGeneric_h  [build/header_guard] [5]
Source/WebCore/html/track/TextTrackCueGeneric.h:69:  The parameter name "context" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/html/track/TextTrack.h:108:  The parameter name "cue" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 6 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Eric Carlson 2013-01-16 14:52:26 PST
Created attachment 183037 [details]
Update patch for my good friend the style bot.
Comment 4 WebKit Review Bot 2013-01-16 14:54:03 PST
Attachment 183037 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/html/track/TextTrack.h:108:  The parameter name "cue" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 WebKit Review Bot 2013-01-16 15:41:02 PST
Comment on attachment 183037 [details]
Update patch for my good friend the style bot.

Attachment 183037 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15914508
Comment 6 Eric Carlson 2013-01-16 15:53:22 PST
Created attachment 183050 [details]
Add new files to other port build systems.
Comment 7 EFL EWS Bot 2013-01-16 16:58:06 PST
Comment on attachment 183050 [details]
Add new files to other port build systems.

Attachment 183050 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/15909617
Comment 8 Eric Carlson 2013-01-16 17:55:16 PST
Created attachment 183074 [details]
Another patch, another build system.
Comment 9 Sam Weinig 2013-01-20 14:45:36 PST
Comment on attachment 183074 [details]
Another patch, another build system.

View in context: https://bugs.webkit.org/attachment.cgi?id=183074&action=review

r- due to the leak.  I am also not fond of the name TextTrackCueGeneric, since I don't understand what is generic about it.

> Source/WebCore/html/track/TextTrackCueGeneric.cpp:103
> +    :TextTrackCue(context, start, end, content)

Missing space.

> Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h:50
> +    enum alignment {

Types should start with a capital letter.

> Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:335
> +    m_cues.resize(0);

This looks like a leak to me.

> Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:66
> +    Vector<GenericCueData*> m_cues;

I don't see anyone deleting these cues.  Can we use an OwnPtr?
Comment 10 Eric Carlson 2013-01-21 13:23:11 PST
(In reply to comment #9)
> (From update of attachment 183074 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=183074&action=review
> 
> r- due to the leak.  I am also not fond of the name TextTrackCueGeneric, since I don't understand what is generic about it.
> 
A "generic" cue is a non-WebVTT cue, so it is one which should not be positioned/sized as if it was WebVTT. I agree that TextTrackCueGeneric isn't a great name, but I couldn't come up with anything better (TextTrackCueNonWebVTT, yuck). I added a short comment explaining what it is.

> > Source/WebCore/html/track/TextTrackCueGeneric.cpp:103
> > +    :TextTrackCue(context, start, end, content)
> 
> Missing space.
> 
Fixed.

> > Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h:50
> > +    enum alignment {
> 
> Types should start with a capital letter.
> 
Fixed.

> > Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:335
> > +    m_cues.resize(0);
> 
> This looks like a leak to me.
> 
> > Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:66
> > +    Vector<GenericCueData*> m_cues;
> 
> I don't see anyone deleting these cues.  Can we use an OwnPtr?
>
Oops, it was a leak. Fixed by changing to Vector<OwnPtr<GenericCueData> >.
Comment 11 Eric Carlson 2013-01-21 13:24:04 PST
Created attachment 183826 [details]
Updated patch.
Comment 12 WebKit Review Bot 2013-01-21 13:29:55 PST
Attachment 183826 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:307:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:327:  Local variables should never be PassOwnPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
Total errors found: 2 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Eric Carlson 2013-01-21 13:44:45 PST
Created attachment 183828 [details]
Updated patch.
Comment 14 Sam Weinig 2013-01-21 13:47:23 PST
Comment on attachment 183828 [details]
Updated patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=183828&action=review

> Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h:95
> +private:
> +
> +    double m_startTime;

Unnecessary newline.
Comment 15 WebKit Review Bot 2013-01-21 13:49:15 PST
Attachment 183828 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:307:  Extra space after ( in function call  [whitespace/parens] [4]
Total errors found: 1 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 Eric Carlson 2013-01-21 13:51:25 PST
Created attachment 183831 [details]
One byte smaller this time.
Comment 17 Eric Carlson 2013-01-21 14:05:49 PST
Comment on attachment 183831 [details]
One byte smaller this time.

http://trac.webkit.org/changeset/140359
Comment 18 Radar WebKit Bug Importer 2013-01-21 14:07:15 PST
<rdar://problem/13055333>