[Bug 704340] New: osvideosink: code refactoring: splitting obj-c code to separate files

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jul 16 10:16:27 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=704340
  GStreamer | gst-plugins-good | git

           Summary: osvideosink: code refactoring: splitting obj-c code to
                    separate files
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Mac OS
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: 4ernov at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


I finally finished merging my changes with refactoring of osxvideosink code
with some fixes. Here's a patch set on that. I hope, someone (perhaps, Andoni
or Sebastian) would kindly review it and push it, if it's worth it.

Here's some list of changes:
- Objective C code of GstOSXVideoSinkObject, GstWindowDelegate, GstBufferObject
and NSApplication was moved to separate set of files, nssinkobject.h(.m). So
was all Cocoa threading-aware code. Now it's about 600 lines remaining in
osxvideosink.m and another ~400 lines in nssinkobject.m. I hope, now it's
really clearer and easier to read, analyze and debug
- all the AutoReleasePool calls were eliminated as they were used in a little
bit messy places and turned out to be quite unnecessary. I analyzed carefully
all the places where memory for NS objects and Gst objects is allocated,
there're not so many of them, so it's quite handy and efficient to control it
manually
- compilation and running in case of RUN_NS_APP_THREAD were restored and tested
- setview was fixed to support changing window-id even in PLAYING state without
any drawbacks, though it's not necessary
- more full substitutions in GstOSXVideoSinkObject in case of RUN_NS_APP_THREAD
defined to allow our NSThread pretend to be mainThread more consistent way
(performSelectorOnMainThread now works out of the box)
- some threading-related minor fixes

In general, now all the GstOSXVideoSinkObject is called in main thread and do
some complex run-loop logic while all the functions in osxvideosink do
GStreamer-related things.

I've tested the code using gst-launch-1.0 both with RUN_NS_APP_THREAD
definition on and off, with single and multiple instances. So was performed
with my Qt4 application to test GstVideoOverlay stuff (RUN_NS_APP_THREAD on and
off, single and multiple instances). All the tests appear to finish
successfully.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list