Bug 139064 - [GStreamer] HTTP source element lacks SCHEDULING query support
Summary: [GStreamer] HTTP source element lacks SCHEDULING query support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-26 07:20 PST by Philippe Normand
Modified: 2014-11-28 03:05 PST (History)
2 users (show)

See Also:


Attachments
patch (2.25 KB, patch)
2014-11-26 07:25 PST, Philippe Normand
cgarcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2014-11-26 07:20:53 PST
This is needed for adaptive streaming cases.
Comment 1 Philippe Normand 2014-11-26 07:25:20 PST
Created attachment 242229 [details]
patch
Comment 2 Carlos Garcia Campos 2014-11-26 08:06:05 PST
Comment on attachment 242229 [details]
patch

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

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:589
> +        gint minSize, maxSize, align;

Nit: use int instead of gint here.

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:592
> +        flags = static_cast<GstSchedulingFlags>(static_cast<unsigned>(flags) | GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED);

Do you really need the unsigned cast too? can't this be flags |= GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED?
Comment 3 Philippe Normand 2014-11-26 08:35:37 PST
(In reply to comment #2)
> Comment on attachment 242229 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=242229&action=review
> 
> > Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:589
> > +        gint minSize, maxSize, align;
> 
> Nit: use int instead of gint here.
> 

ok :)

> > Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:592
> > +        flags = static_cast<GstSchedulingFlags>(static_cast<unsigned>(flags) | GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED);
> 
> Do you really need the unsigned cast too? can't this be flags |=
> GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED?

Fails to build here:

../../Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: In function ‘gboolean webKitWebSrcQueryWithParent(GstPad*, GstObject*, GstQuery*)’:
../../Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:593:15: error: invalid conversion from ‘int’ to ‘GstSchedulingFlags’ [-fpermissive]
         flags |= GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED;
Comment 4 Philippe Normand 2014-11-26 08:57:03 PST
Ah well, not using a variable and doing a static_cast works. I think I'll land this tomorrow!
Comment 5 Philippe Normand 2014-11-28 03:05:08 PST
Committed r176561: <http://trac.webkit.org/changeset/176561>