WebKit Bugzilla
Attachment 373237 Details for
Bug 199356
: [GStreamer] The CREATE_TRACK macro is messed up
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199356-20190701162503.patch (text/plain), 4.54 KB, created by
Philippe Normand
on 2019-07-01 08:25:05 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Philippe Normand
Created:
2019-07-01 08:25:05 PDT
Size:
4.54 KB
patch
obsolete
>Subversion Revision: 247007 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 75890a7faa532e418411affa505875b9c787ab46..1592aaeaf34a94a502c3005d94e7c1b2766f7eb5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,12 @@ >+2019-07-01 Philippe Normand <pnormand@igalia.com> >+ >+ [GStreamer] The CREATE_TRACK macro is messed up >+ https://bugs.webkit.org/show_bug.cgi?id=199356 >+ >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: >+ (WebCore::MediaPlayerPrivateGStreamer::updateTracks): Fix the >+ CREATE_TRACK macro for !VIDEO_TRACK builds. >+ > 2019-07-01 Philippe Normand <pnormand@igalia.com> > > [GStreamer] Cannot play Bert's Bytes radio stream from http://radio.dos.nl/ >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >index 97173f30615247678bab0ed3ce22ee6ccf70db59..90894d0ec83aca58b82cd5834a4b423d50928790 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >@@ -680,18 +680,6 @@ void MediaPlayerPrivateGStreamer::clearTracks() > } > #undef CLEAR_TRACKS > >-#if ENABLE(VIDEO_TRACK) >-#define CREATE_TRACK(type, Type) \ >- m_has##Type = true; \ >- if (!useMediaSource) {\ >- RefPtr<Type##TrackPrivateGStreamer> track = Type##TrackPrivateGStreamer::create(makeWeakPtr(*this), i, stream); \ >- m_##type##Tracks.add(track->id(), track); \ >- m_player->add##Type##Track(*track);\ >- if (gst_stream_get_stream_flags(stream.get()) & GST_STREAM_FLAG_SELECT) { \ >- m_current##Type##StreamId = String(gst_stream_get_stream_id(stream.get())); \ >- } \ >- } >- > FloatSize MediaPlayerPrivateGStreamer::naturalSize() const > { > #if ENABLE(MEDIA_STREAM) >@@ -710,8 +698,22 @@ FloatSize MediaPlayerPrivateGStreamer::naturalSize() const > > return MediaPlayerPrivateGStreamerBase::naturalSize(); > } >+ >+#if ENABLE(VIDEO_TRACK) >+#define CREATE_TRACK(type, Type) G_STMT_START { \ >+ m_has##Type = true; \ >+ if (!useMediaSource) { \ >+ RefPtr<Type##TrackPrivateGStreamer> track = Type##TrackPrivateGStreamer::create(makeWeakPtr(*this), i, stream); \ >+ m_##type##Tracks.add(track->id(), track); \ >+ m_player->add##Type##Track(*track); \ >+ if (gst_stream_get_stream_flags(stream.get()) & GST_STREAM_FLAG_SELECT) \ >+ m_current##Type##StreamId = String(gst_stream_get_stream_id(stream.get())); \ >+ } \ >+ } G_STMT_END > #else >-#define CREATE_TRACK(type, _id, tracks, method, stream) m_has##Type## = true; >+#define CREATE_TRACK(type, Type) G_STMT_START { \ >+ m_has##Type## = true; \ >+ } G_STMT_END > #endif // ENABLE(VIDEO_TRACK) > > void MediaPlayerPrivateGStreamer::updateTracks() >@@ -732,11 +734,11 @@ void MediaPlayerPrivateGStreamer::updateTracks() > GstStreamType type = gst_stream_get_stream_type(stream.get()); > > GST_DEBUG_OBJECT(pipeline(), "Inspecting %s track with ID %s", gst_stream_type_get_name(type), streamId.utf8().data()); >- if (type & GST_STREAM_TYPE_AUDIO) { >- CREATE_TRACK(audio, Audio) >- } else if (type & GST_STREAM_TYPE_VIDEO) { >- CREATE_TRACK(video, Video) >- } else if (type & GST_STREAM_TYPE_TEXT && !useMediaSource) { >+ if (type & GST_STREAM_TYPE_AUDIO) >+ CREATE_TRACK(audio, Audio); >+ else if (type & GST_STREAM_TYPE_VIDEO) >+ CREATE_TRACK(video, Video); >+ else if (type & GST_STREAM_TYPE_TEXT && !useMediaSource) { > #if ENABLE(VIDEO_TRACK) > auto track = InbandTextTrackPrivateGStreamer::create(textTrackIndex++, stream); > m_textTracks.add(streamId, track.copyRef()); >@@ -755,6 +757,8 @@ void MediaPlayerPrivateGStreamer::updateTracks() > m_player->client().mediaPlayerEngineUpdated(m_player); > } > >+#undef CREATE_TRACK >+ > void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackType trackType, unsigned index) > { > // FIXME: Remove isMediaSource() test below when fixing https://bugs.webkit.org/show_bug.cgi?id=182531.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
calvaris
:
review+
commit-queue
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199356
: 373237