[Webkit-unassigned] [Bug 103771] [GStreamer] support in-band text tracks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 29 07:51:05 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=103771





--- Comment #135 from Eric Carlson <eric.carlson at apple.com>  2013-08-29 07:50:23 PST ---
(In reply to comment #133)
> (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;
>     }
> 
  Yes, although I think this should be in InbandTextTrack::create instead so HTMLMediaElement doesn't have to know about the different types of in-band tracks.

> 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?

  This seems fine.

-- 
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