[Webkit-unassigned] [Bug 103771] [GStreamer] support in-band text tracks
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 28 16:50:59 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=103771
--- Comment #133 from Brendan Long <b.long at cablelabs.com> 2013-08-28 16:50:17 PST ---
(In reply to comment #132)
> > Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:84
> > + OwnPtr<WebVTTParser> m_webVTTParser;
>
> The WebVTT parser is in html/track/ so this is a layering violation :-(. Luckily, I don't think it would be a big deal to pass the raw VTT bytes through the client interface and have the track do the parsing. It might make sense to subclass InbandTextTrack so every in-band track doesn't have get a VTT parser (I maybe should have done the same for "Generic" cues).
Like this?
https://github.com/cablelabs/webkit/commit/43740486884c088b7c97ed077685560c14e423cf
Is adding a "cueFormat()" function the right way to handle this?
RefPtr<InbandTextTrack> textTrack;
switch (prpTrack->cueFormat()) {
case InbandTextTrackPrivate::Generic:
textTrack = InbandGenericTextTrack::create(ActiveDOMObject::scriptExecutionContext(), this, prpTrack);
break;
case InbandTextTrackPrivate::WebVTT:
textTrack = InbandWebVTTTextTrack::create(ActiveDOMObject::scriptExecutionContext(), this, prpTrack);
break;
default:
ASSERT_NOT_REACHED();
// Make sure this gets GC'd
RefPtr<InbandTextTrackPrivate> track = prpTrack;
return;
}
Also, I left InbandTextTrackPrivateClient mostly alone, but then added asserts for functions that shouldn't be called, like in InbandWebVTTTextTrack:
virtual void addGenericCue(InbandTextTrackPrivate*, PassRefPtr<GenericCueData>) OVERRIDE { ASSERT_NOT_REACHED(); }
virtual void updateGenericCue(InbandTextTrackPrivate*, GenericCueData*) OVERRIDE { ASSERT_NOT_REACHED(); }
virtual void removeGenericCue(InbandTextTrackPrivate*, GenericCueData*) OVERRIDE { ASSERT_NOT_REACHED(); }
Would it be better to have a InbandWebVTTTextTrackPrivateClient and InbandGenericTextTrackPrivateClient?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list