Changeset 242881 in webkit
- Timestamp:
- Mar 13, 2019, 8:28:08 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r242864 r242881 1 2019-03-13 Thibault Saunier <tsaunier@igalia.com> 2 3 [GStreamer][WebRTC]: Use codec setting video height/width as fallback 4 https://bugs.webkit.org/show_bug.cgi?id=195675 5 6 Reviewed by Philippe Normand. 7 8 In some cases the frame height and width is not set (not sure why/ in 9 what conditions but it happens) so make sure to get the information from 10 the VideoCodec when configuring the encoder. 11 12 * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp: 13 (WebCore::GStreamerVideoDecoder::GStreamerVideoDecoder): 14 (WebCore::GStreamerVideoDecoder::GetCapsForFrame): 15 1 16 2019-03-13 Miguel Gomez <magomez@igalia.com> 2 17 -
trunk/Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp
r238557 r242881 55 55 GStreamerVideoDecoder() 56 56 : m_pictureId(0) 57 , m_width(0) 58 , m_height(0) 57 59 , m_firstBufferPts(GST_CLOCK_TIME_NONE) 58 60 , m_firstBufferDts(GST_CLOCK_TIME_NONE) … … 81 83 } 82 84 83 int32_t InitDecode(const webrtc::VideoCodec* , int32_t) override85 int32_t InitDecode(const webrtc::VideoCodec* codecSettings, int32_t) override 84 86 { 85 87 m_src = makeElement("appsrc"); … … 87 89 auto capsfilter = CreateFilter(); 88 90 auto decoder = makeElement("decodebin"); 91 92 if (codecSettings) { 93 m_width = codecSettings->width; 94 m_height = codecSettings->height; 95 } 89 96 90 97 // Make the decoder output "parsed" frames only and let the main decodebin … … 194 201 if (!m_caps) { 195 202 m_caps = adoptGRef(gst_caps_new_simple(Caps(), 196 "width", G_TYPE_INT, image._encodedWidth ,197 "height", G_TYPE_INT, image._encodedHeight ,203 "width", G_TYPE_INT, image._encodedWidth ? image._encodedWidth : m_width, 204 "height", G_TYPE_INT, image._encodedHeight ? image._encodedHeight : m_height, 198 205 nullptr)); 199 206 } … … 270 277 GRefPtr<GstCaps> m_caps; 271 278 gint m_pictureId; 279 gint m_width; 280 gint m_height; 272 281 273 282 private: … … 328 337 if (!m_caps) { 329 338 m_caps = adoptGRef(gst_caps_new_simple(Caps(), 330 "width", G_TYPE_INT, image._encodedWidth, 331 "height", G_TYPE_INT, image._encodedHeight, 332 "profile", G_TYPE_STRING, m_profile ? m_profile : "baseline", 333 "stream-format", G_TYPE_STRING, "byte-stream", 339 "width", G_TYPE_INT, image._encodedWidth ? image._encodedWidth : m_width, 340 "height", G_TYPE_INT, image._encodedHeight ? image._encodedHeight : m_height, 334 341 "alignment", G_TYPE_STRING, "au", 335 342 nullptr));
Note:
See TracChangeset
for help on using the changeset viewer.