After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793118 - frames are pixelated/blurred on ios
frames are pixelated/blurred on ios
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.12.4
Other other
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-02 10:18 UTC by Muhammet Ilendemli
Modified: 2018-11-03 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Muhammet Ilendemli 2018-02-02 10:18:37 UTC
I am working on an iOS app, my coworker is working on an Android app

We almost have the same pipeline:
            rtspsrc location=%@ latency=50 !
            rtpjitterbuffer !
            rtph264depay !
            avdec_h264 !
            videoconvert !
            glimagesink

I also have used this pipeline:
            videotestsrc !
            video/x-raw,width=1920,height=1080 !
            glimagesink

Basically any drawn frame is blurred (you can see white fading to blue) when using videotestsrc and/or pixelated when using an rtspsrc for example any earthcam stream on my devices. It looks fine on android.

Recordings were done using this pipeline and they look absolutely fine:
            rtspsrc location=%@ latency=0 connection-speed=30000 !
            rtpjitterbuffer !
            rtph264depay !
            h264parse !
            queue !
            mp4mux !
            filesink location=%@

Here is a gallery with some screenshots: https://imgur.com/a/QkSoV

Either I am missing something or I don't know why some streams are pixelated.
Comment 1 Muhammet Ilendemli 2018-02-05 15:42:02 UTC
A workround for the issue:
Create a subclass of CAEAGLLayer and override the frame attribute to return a scaled version of your screen' bounds

class CustomLayer: CAEAGLLayer {
    override var frame: CGRect {
        set { }
        get {
            let transform = CGAffineTransform(scaleX:  6, y:  6)
            return UIScreen.main.bounds.applying(transform)
        }
    }
}

6 because:
 i have an iPhone 6, so the screen width is 320. ergo stream gets resized to 320x180
 the video is an 1080p rtsp stream (i think) from eathcam.com
 1920/320 = 6 or 1080/180 = 6

set the contentScaleFactor to 6 aswell, because reasons, and use your subclass of CAEAGLLayer:

class EAGLView: UIView {
    override class var layerClass: AnyClass {
        return CustomLayer.self
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        contentScaleFactor = 6
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}

any 1080p stream should be clear now.
Comment 2 GStreamer system administrator 2018-11-03 14:17:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/652.