WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
132517
Implement scan backward and forward in video fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=132517
Summary
Implement scan backward and forward in video fullscreen.
Jeremy Jones
Reported
2014-05-02 21:54:40 PDT
Implement scan backward and forward in video fullscreen.
Attachments
Patch
(16.31 KB, patch)
2014-05-02 22:09 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch
(16.35 KB, patch)
2014-05-05 12:52 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch
(15.93 KB, patch)
2014-05-05 13:37 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch
(16.10 KB, patch)
2014-05-05 16:55 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Jeremy Jones
Comment 1
2014-05-02 22:09:43 PDT
Created
attachment 230741
[details]
Patch
Eric Carlson
Comment 2
2014-05-05 09:16:48 PDT
<
rdar://16562168
>
Eric Carlson
Comment 3
2014-05-05 10:49:29 PDT
Comment on
attachment 230741
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=230741&action=review
> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:280 > +- (void)scanForward:(id)sender > +{ > + UNUSED_PARAM(sender); > + ASSERT(self.delegate); > + self.delegate->beginScanningForward(); > +} > + > +- (void)beginScanningForward:(id)sender > +{ > + UNUSED_PARAM(sender); > + ASSERT(self.delegate); > + self.delegate->beginScanningForward(); > +}
What is the difference between these? Will only one be called?
> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:311 > +- (void)scanBackward:(id)sender > +{ > + UNUSED_PARAM(sender); > + ASSERT(self.delegate); > + self.delegate->beginScanningBackward(); > +} > + > +- (void)beginScanningBackward:(id)sender > +{ > + UNUSED_PARAM(sender); > + ASSERT(self.delegate); > + self.delegate->beginScanningBackward(); > +}
Ditto.
> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:322 > + CMTime minimumTime = getkCMTimeIndefinite();
Nit: this would be easier to understand if you defined a macro above: #define kCMTimeIndefinite getkCMTimeIndefinite
> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:327 > + return CMTIME_IS_NUMERIC(minimumTime);
I am not sure this makes sense unless "canSeekToBeginning" mean "can seek somewhere", because this will return true if it is possible to seek anywhere. What is the answer returned from this selector used for?
> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:351 > +- (BOOL)canSeekToEnd > +{ > + CMTime maximumTime = getkCMTimeIndefinite(); > + > + for (NSValue *value in [self seekableTimeRanges]) > + maximumTime = CMTimeMaximum(CMTimeRangeGetEnd([value CMTimeRangeValue]), maximumTime); > + > + return CMTIME_IS_NUMERIC(maximumTime); > +}
Ditto.
Jeremy Jones
Comment 4
2014-05-05 12:50:34 PDT
(In reply to
comment #3
)
> (From update of
attachment 230741
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=230741&action=review
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:280 > > +- (void)scanForward:(id)sender > > +{ > > + UNUSED_PARAM(sender); > > + ASSERT(self.delegate); > > + self.delegate->beginScanningForward(); > > +} > > + > > +- (void)beginScanningForward:(id)sender > > +{ > > + UNUSED_PARAM(sender); > > + ASSERT(self.delegate); > > + self.delegate->beginScanningForward(); > > +} > > What is the difference between these? Will only one be called?
I re-read the code. These are not used in conjunction with each-other, but for different ways of scanning. I'll remove -scanForward:
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:311 > > +- (void)scanBackward:(id)sender > > +{ > > + UNUSED_PARAM(sender); > > + ASSERT(self.delegate); > > + self.delegate->beginScanningBackward(); > > +} > > + > > +- (void)beginScanningBackward:(id)sender > > +{ > > + UNUSED_PARAM(sender); > > + ASSERT(self.delegate); > > + self.delegate->beginScanningBackward(); > > +} > > Ditto.
Ditto.
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:322 > > + CMTime minimumTime = getkCMTimeIndefinite(); > > Nit: this would be easier to understand if you defined a macro above: #define kCMTimeIndefinite getkCMTimeIndefinite
Changed in two places.
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:327 > > + return CMTIME_IS_NUMERIC(minimumTime); > > I am not sure this makes sense unless "canSeekToBeginning" mean "can seek somewhere", because this will return true if it is possible to seek anywhere. What is the answer returned from this selector used for?
It is looking for an answer that works for byte-range, HLS and VOD. "beginning" isn't necessarily defined to mean time zero for HLS and VOD. And file based can always seek to time zero. It is used to enable the seek to beginning button. It will be false when there is no movie loaded, or seekable ranges are not yet known.
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:351 > > +- (BOOL)canSeekToEnd > > +{ > > + CMTime maximumTime = getkCMTimeIndefinite(); > > + > > + for (NSValue *value in [self seekableTimeRanges]) > > + maximumTime = CMTimeMaximum(CMTimeRangeGetEnd([value CMTimeRangeValue]), maximumTime); > > + > > + return CMTIME_IS_NUMERIC(maximumTime); > > +} > > Ditto.
Ditto.
Jeremy Jones
Comment 5
2014-05-05 12:52:30 PDT
Created
attachment 230848
[details]
Patch
Jeremy Jones
Comment 6
2014-05-05 13:37:22 PDT
Created
attachment 230854
[details]
Patch
Eric Carlson
Comment 7
2014-05-05 14:05:24 PDT
Comment on
attachment 230854
[details]
Patch These changes look fine to me, but I am not a WK2 reviewer so someone else will have to r+.
Jeremy Jones
Comment 8
2014-05-05 16:55:03 PDT
Created
attachment 230867
[details]
Patch
Simon Fraser (smfr)
Comment 9
2014-05-05 18:09:30 PDT
Comment on
attachment 230867
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=230867&action=review
> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:95 > +@property (readonly) BOOL canScanForward; > +@property (readonly) BOOL canScanBackward; > +@property (readonly) BOOL canSeekToBeginning; > +@property (readonly) BOOL canSeekToEnd;
Should these be nonatomic?
Jeremy Jones
Comment 10
2014-05-05 18:18:04 PDT
(In reply to
comment #9
)
> (From update of
attachment 230867
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=230867&action=review
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:95 > > +@property (readonly) BOOL canScanForward; > > +@property (readonly) BOOL canScanBackward; > > +@property (readonly) BOOL canSeekToBeginning; > > +@property (readonly) BOOL canSeekToEnd; > > Should these be nonatomic?
Possibly. But that is a bigger question than this bug. I've filed
https://bugs.webkit.org/show_bug.cgi?id=132595
to cover this question.
WebKit Commit Bot
Comment 11
2014-05-05 18:50:01 PDT
Comment on
attachment 230867
[details]
Patch Clearing flags on attachment: 230867 Committed
r168341
: <
http://trac.webkit.org/changeset/168341
>
WebKit Commit Bot
Comment 12
2014-05-05 18:50:05 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug