WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 77089
[GStreamer] 0.11 support in MediaPlayerPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=77089
Summary
[GStreamer] 0.11 support in MediaPlayerPrivateGStreamer
Philippe Normand
Reported
2012-01-26 03:00:15 PST
SSIA
Attachments
0.11 MediaPlayerPrivate
(10.46 KB, patch)
2012-01-26 03:16 PST
,
Philippe Normand
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
0.11 MediaPlayerPrivate
(10.91 KB, patch)
2012-01-26 03:31 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
0.11 MediaPlayerPrivate
(17.25 KB, patch)
2012-02-27 01:57 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
0.11 MediaPlayerPrivate
(18.40 KB, patch)
2012-02-27 02:26 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(17.99 KB, patch)
2012-02-27 08:14 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(17.87 KB, patch)
2012-02-27 08:21 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(15.21 KB, patch)
2012-02-27 08:31 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(15.42 KB, patch)
2012-02-27 08:55 PST
,
Philippe Normand
mrobinson
: review+
gyuyoung.kim
: commit-queue-
Details
Formatted Diff
Diff
Patch for landing
(19.09 KB, patch)
2012-02-27 09:04 PST
,
Philippe Normand
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
Patch for landing, renaming GStreamerVersioning.c to GStreamerVersioning.cpp
(19.16 KB, patch)
2012-02-27 09:18 PST
,
Philippe Normand
gustavo
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2012-01-26 03:16:13 PST
Created
attachment 124092
[details]
0.11 MediaPlayerPrivate
Early Warning System Bot
Comment 2
2012-01-26 03:21:22 PST
Comment on
attachment 124092
[details]
0.11 MediaPlayerPrivate
Attachment 124092
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/11191294
Philippe Normand
Comment 3
2012-01-26 03:31:18 PST
Created
attachment 124094
[details]
0.11 MediaPlayerPrivate
Sebastian Dröge (slomo)
Comment 4
2012-01-30 02:45:08 PST
Comment on
attachment 124094
[details]
0.11 MediaPlayerPrivate View in context:
https://bugs.webkit.org/attachment.cgi?id=124094&action=review
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:979 > + gst_object_unref(pad);
Nope, g_value_unset() please :)
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1802 > + GstElement* videoConvert = gst_element_factory_make("videoconvert", 0);
Why is this necessary in 1.0 only?
Philippe Normand
Comment 5
2012-01-30 03:12:49 PST
(In reply to
comment #4
)
> (From update of
attachment 124094
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=124094&action=review
> > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:979 > > + gst_object_unref(pad); > > Nope, g_value_unset() please :) >
Ouch!
> > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1802 > > + GstElement* videoConvert = gst_element_factory_make("videoconvert", 0); > > Why is this necessary in 1.0 only?
Oh hum yeah I don't remember why I added that, I'll check this part again. Thanks for the review!
Martin Robinson
Comment 6
2012-01-30 08:47:51 PST
Comment on
attachment 124094
[details]
0.11 MediaPlayerPrivate View in context:
https://bugs.webkit.org/attachment.cgi?id=124094&action=review
Nice stuff.
> Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp:43 > +#ifdef GST_API_VERSION_1 > + gst_object_ref_sink(GST_OBJECT(ptr)); > +#else > gst_object_ref(GST_OBJECT(ptr)); > gst_object_sink(GST_OBJECT(ptr)); > +#endif > }
It's probably cleaner to just abstract this away into a helper function that does the right thing for each GStreamer. Imagine something like GtkVersioning.h.
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:53 > +#ifdef GST_API_VERSION_1 > +#include <gst/audio/streamvolume.h> > +#else > #include <gst/interfaces/streamvolume.h> > +#endif
Headers included behind ifdefs usually go in their own block.
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:78 > +#ifdef GST_API_VERSION_1 > +#define PLAYBIN_NAME "playbin" > +#else > +#define PLAYBIN_NAME "playbin2" > +#endif
Please use a const char* instead of a #define. static const char* gPlaybinName = "playbin"
Philippe Normand
Comment 7
2012-02-15 06:31:03 PST
Comment on
attachment 124094
[details]
0.11 MediaPlayerPrivate needs work
Philippe Normand
Comment 8
2012-02-15 07:10:40 PST
(In reply to
comment #4
)
> > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1802 > > + GstElement* videoConvert = gst_element_factory_make("videoconvert", 0); > > Why is this necessary in 1.0 only?
I've actually tried to remove this videoconvert element but I now get a warning from basetransform :00:00.524129217 31921 0x9f8a000 DEBUG basetransform gstbasetransform.c:527:gst_base_transform_transform_caps:<identity> to: video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.524214702 31921 0x9f8a000 DEBUG basetransform gstbasetransform.c:977:gst_base_transform_find_transform:<identity> intersecting against padtemplate ANY 0:00:00.524267991 31921 0x9f8a000 DEBUG basetransform gstbasetransform.c:1051:gst_base_transform_find_transform: have fixed caps video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.524344258 31921 0x9f8a000 DEBUG basetransform gstbasetransform.c:1060:gst_base_transform_find_transform:<identity> calling fixate_caps for video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 using caps video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 on pad identity:src 0:00:00.524459286 31921 0x9f8a000 DEBUG basetransform gstbasetransform.c:927:gst_base_transform_default_fixate:<identity> using default caps fixate function 0:00:00.524500772 31921 0x9f8a000 DEBUG basetransform gstbasetransform.c:1065:gst_base_transform_find_transform:<identity> after fixating video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.524648417 31921 0x9f8a000 DEBUG basetransform gstbasetransform.c:1106:gst_base_transform_find_transform:<identity> FAILED to get peer of <identity:src> to accept video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.524736626 31921 0x9f8a000 WARN basetransform gstbasetransform.c:1280:gst_base_transform_setcaps:<identity> transform could not transform video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 in anything we support If I add videoconvert some caps fields like colorimetry and chroma-site get removed from the caps before the video-sink.
Philippe Normand
Comment 9
2012-02-27 01:57:12 PST
Created
attachment 128986
[details]
0.11 MediaPlayerPrivate
Philippe Normand
Comment 10
2012-02-27 01:58:58 PST
(In reply to
comment #8
)
> (In reply to
comment #4
) > > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1802 > > > + GstElement* videoConvert = gst_element_factory_make("videoconvert", 0); > > > > Why is this necessary in 1.0 only? > > I've actually tried to remove this videoconvert element but I now get a warning from basetransform > >
Managed to get rid of it :) I guess the issue was fixed in basetransform.
WebKit Review Bot
Comment 11
2012-02-27 02:02:26 PST
Attachment 128986
[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/platform/graphics/gstreamer/GStreamerVersioning.c:26: webkit_gst_object_ref_sink is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.c:36: webkit_gst_element_get_pad_caps is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h:31: webkit_gst_object_ref_sink is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h:32: webkit_gst_element_get_pad_caps is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 4 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexis Menard (darktears)
Comment 12
2012-02-27 02:14:17 PST
Comment on
attachment 128986
[details]
0.11 MediaPlayerPrivate Would that be possible that you patch Source/WebCore/Target.pri to compile the new files? Line 3228. It should be very trivial.
Philippe Normand
Comment 13
2012-02-27 02:20:09 PST
(In reply to
comment #12
)
> (From update of
attachment 128986
[details]
) > Would that be possible that you patch Source/WebCore/Target.pri to compile the new files? Line 3228. It should be very trivial.
Ok, I'll have a look!
Philippe Normand
Comment 14
2012-02-27 02:26:32 PST
Created
attachment 128992
[details]
0.11 MediaPlayerPrivate
WebKit Review Bot
Comment 15
2012-02-27 02:30:11 PST
Attachment 128992
[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/platform/graphics/gstreamer/GStreamerVersioning.c:26: webkit_gst_object_ref_sink is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.c:36: webkit_gst_element_get_pad_caps is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h:31: webkit_gst_object_ref_sink is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h:32: webkit_gst_element_get_pad_caps is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 4 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Early Warning System Bot
Comment 16
2012-02-27 03:00:26 PST
Comment on
attachment 128992
[details]
0.11 MediaPlayerPrivate
Attachment 128992
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/11628941
Gyuyoung Kim
Comment 17
2012-02-27 03:32:57 PST
Comment on
attachment 128992
[details]
0.11 MediaPlayerPrivate
Attachment 128992
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/11628956
Philippe Normand
Comment 18
2012-02-27 07:55:54 PST
(In reply to
comment #16
)
> (From update of
attachment 128992
[details]
) >
Attachment 128992
[details]
did not pass qt-ews (qt): > Output:
http://queues.webkit.org/results/11628941
I can't reproduce this build error here. Any help would be appreciated :)
Philippe Normand
Comment 19
2012-02-27 08:14:27 PST
Created
attachment 129039
[details]
Patch
Early Warning System Bot
Comment 20
2012-02-27 08:19:27 PST
Comment on
attachment 129039
[details]
Patch
Attachment 129039
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/11643042
Philippe Normand
Comment 21
2012-02-27 08:19:40 PST
(In reply to
comment #17
)
> (From update of
attachment 128992
[details]
) >
Attachment 128992
[details]
did not pass efl-ews (efl): > Output:
http://queues.webkit.org/results/11628956
Kim can you please have a look? I can't build the EFL port here, seems like eina is too old, even on debian unstable...
Gyuyoung Kim
Comment 22
2012-02-27 08:20:27 PST
Comment on
attachment 129039
[details]
Patch
Attachment 129039
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/11633964
Philippe Normand
Comment 23
2012-02-27 08:21:03 PST
Created
attachment 129040
[details]
Patch
Gyuyoung Kim
Comment 24
2012-02-27 08:26:16 PST
Comment on
attachment 129040
[details]
Patch
Attachment 129040
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/11634006
Philippe Normand
Comment 25
2012-02-27 08:31:10 PST
Created
attachment 129043
[details]
Patch
Philippe Normand
Comment 26
2012-02-27 08:33:46 PST
Crossing fingers for EFL green-go.
Gyuyoung Kim
Comment 27
2012-02-27 08:36:46 PST
Comment on
attachment 129043
[details]
Patch
Attachment 129043
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/11643051
Martin Robinson
Comment 28
2012-02-27 08:37:33 PST
View in context:
https://bugs.webkit.org/attachment.cgi?id=129040&action=review
r- just because a few confusing bits. Looks good generally!
> Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.c:22 > +#include "config.h" > + > +#include "GStreamerVersioning.h"
Extra newline here.
> Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h:26 > +G_BEGIN_DECLS
You should not need B_BEGIN_DECLS and G_END_DECLS unless you are using this file from a C file. They just unmangle the symbols.
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:978 > + GstPad* pad = reinterpret_cast<GstPad*>(g_value_dup_object(&item));
A static_cast here should be enough.
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:981 > + if (gst_pad_query_duration(pad, fmt, &padLength) > + && padLength > length)
Typically lines go to 120 characters in WebKit, so don't break this line.
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:983 > + g_value_unset(reinterpret_cast<GValue*>(pad));
This confuses me. You are calling g_value_unset below, why are you treating the pad like a GValue here, since it's a GstObject? Shouldn't you instead be calling gst_object_unref here? Additionally, if you used g_value_get_object instead of g_value_dup_object above, couldn't you avoid this line entirely?
Philippe Normand
Comment 29
2012-02-27 08:40:51 PST
(In reply to
comment #27
)
> (From update of
attachment 129043
[details]
) >
Attachment 129043
[details]
did not pass efl-ews (efl): > Output:
http://queues.webkit.org/results/11643051
This EFL build error is even more confusing.
Philippe Normand
Comment 30
2012-02-27 08:55:03 PST
Created
attachment 129046
[details]
Patch
Gyuyoung Kim
Comment 31
2012-02-27 09:00:16 PST
Comment on
attachment 129046
[details]
Patch
Attachment 129046
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/11639110
Early Warning System Bot
Comment 32
2012-02-27 09:01:21 PST
Comment on
attachment 129046
[details]
Patch
Attachment 129046
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/11641069
Philippe Normand
Comment 33
2012-02-27 09:02:14 PST
(In reply to
comment #29
)
> (In reply to
comment #27
) > > (From update of
attachment 129043
[details]
[details]) > >
Attachment 129043
[details]
[details] did not pass efl-ews (efl): > > Output:
http://queues.webkit.org/results/11643051
> > This EFL build error is even more confusing.
Thanks Martin for the review but it'd be great to sort out this EFL issue before landing. Any EFL human-folks around?
Philippe Normand
Comment 34
2012-02-27 09:03:57 PST
Ah stupid me, I forgot to add the GStreamerVersioning files in that patch. Will send a new patch just to make sure it builds on EFL.
Philippe Normand
Comment 35
2012-02-27 09:04:43 PST
Created
attachment 129047
[details]
Patch for landing
Early Warning System Bot
Comment 36
2012-02-27 09:09:49 PST
Comment on
attachment 129047
[details]
Patch for landing
Attachment 129047
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/11607034
Gustavo Noronha (kov)
Comment 37
2012-02-27 09:14:22 PST
Comment on
attachment 129047
[details]
Patch for landing
Attachment 129047
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/11644058
Philippe Normand
Comment 38
2012-02-27 09:18:34 PST
Created
attachment 129051
[details]
Patch for landing, renaming GStreamerVersioning.c to GStreamerVersioning.cpp
WebKit Review Bot
Comment 39
2012-02-27 09:21:01 PST
Attachment 129051
[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/platform/graphics/gstreamer/GStreamerVersioning.cpp:36: Declaration has space between type name and * in GstPad *pad [whitespace/declaration] [3] Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:40: Declaration has space between type name and * in GstCaps *caps [whitespace/declaration] [3] Total errors found: 2 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Gustavo Noronha (kov)
Comment 40
2012-02-27 09:23:08 PST
Comment on
attachment 129051
[details]
Patch for landing, renaming GStreamerVersioning.c to GStreamerVersioning.cpp
Attachment 129051
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/11644067
Philippe Normand
Comment 41
2012-02-27 09:43:35 PST
(In reply to
comment #39
)
>
Attachment 129051
[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/platform/graphics/gstreamer/GStreamerVersioning.cpp:36: Declaration has space between type name and * in GstPad *pad [whitespace/declaration] [3] > Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:40: Declaration has space between type name and * in GstCaps *caps [whitespace/declaration] [3] > Total errors found: 2 in 8 files > > > If any of these errors are false positives, please file a bug against check-webkit-style.
Will fix this when landing. For gtk-ews, looks like it's hosed from previous builds with the .c file, I've checked a clean build works locally.
Philippe Normand
Comment 42
2012-02-27 10:04:43 PST
Committed
r109005
: <
http://trac.webkit.org/changeset/109005
>
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