Commit graph

21205 commits

Author SHA1 Message Date
Guillaume Desmottes
0d6359d4a2 glimagesink: fix query leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
e071510b12 glimagesink: properly setup/teardown tests
tcase_add_checked_fixture() is suppose to call the setup and teardown
functions so the tests don't have to do it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
6a02c8a109 glupload: fix shader leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
bebe4ca7ab uvch264demux: fix buffer leaks in test
The mock chain functions aren't unreffing the buffers so the caller
should do it.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
9694e7e820 camerabin: fix element leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
a68534d094 fix buffer leaks in tests
gst_check_drop_buffers() release the buffers exchanged during the test.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
fc5cb1ec13 fix event leaks in tests
The events are supposed to be unreffed when finishing the test, not
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
2ec2e15a2a audiointerleave: fix message leaks by flushing the bus
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
172529e151 audioaggregator: fix buffer leak
If the pad was still owning a buffer when being destroyed it was leaked.

Fix a leak with the test_flush_start_flush_stop test.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
e925a8acf0 autoconvert: fix factories leak in test
The factories returned by gst_registry_find_feature() have to be
unreffed.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Michael Olbrich
378051d80a h264parse: fix default time_offset_length
The default value for time_offset_length should be 24, see
section E2.2 of the H264 spec.

https://bugzilla.gnome.org/show_bug.cgi?id=767792
2016-06-21 10:45:43 +03:00
Joan Pau Beltran
dc762166f3 dc1394src: check for disabled transmission in _stop_cam
For symetry with _start_cam, check that the transmission
is effectively disabled in _stop_cam.

https://bugzilla.gnome.org/show_bug.cgi?id=763026
2016-06-20 21:46:23 +01:00
Reynaldo H. Verdejo Pinochet
eb0a785841 dvbsrc: do not rely on temp var for fail detection
Use errno instead as local var might be overwritten
before the check.
2016-06-17 15:58:09 -07:00
Reynaldo H. Verdejo Pinochet
1824703c81 dvbsrc: rework set_pids()
- Reflow to avoid unneeded nesting
- Free aux pids array earlier
- Adjust debug output to deliver more meaningful information
2016-06-17 15:58:09 -07:00
Reynaldo H. Verdejo Pinochet
13efbf35d9 dvbsrc: drop pointless debug msg 2016-06-17 15:58:09 -07:00
Reynaldo H. Verdejo Pinochet
ea272f0bac codecparsers: drop all otherwizes 2016-06-17 15:58:09 -07:00
Aaron Boxer
81e3b998be jpeg2000parse: support j2c format
https://bugzilla.gnome.org/show_bug.cgi?id=767512
2016-06-17 23:08:37 +03:00
Matthew Waters
05b24c128a tests/glcontext: link against gstvideo for gst_video_info_*
fixes make distcheck complaining about it.
2016-06-16 01:54:16 +10:00
Sergey Borovkov
180405714c qml: Enable qmlglsink for eglfs
https://bugzilla.gnome.org/show_bug.cgi?id=763044
2016-06-16 01:49:16 +10:00
Matthew Waters
14c6fece09 qmlglsink: propagate GL context creation failure upwards
Otherwise an application cannot know if the qmlglsink will be displaying frames
incorrectly/at all.
2016-06-16 01:49:16 +10:00
Matthew Waters
ef508b8461 qmlglsink: also allow wayland-egl as a platform name 2016-06-16 01:49:16 +10:00
Haihua Hu
3903406304 qmlglsink: Add Wayland support
Don't use gstgldisplay to get wayland display. Should use QPA on wayland
to get wayland display for QT.

https://bugzilla.gnome.org/show_bug.cgi?id=767553
2016-06-16 01:49:16 +10:00
Matthew Waters
8c9b231db1 tests/glcontext: update test for gen,del_texture removal 2016-06-16 00:47:42 +10:00
Stefan Sauer
976cb234bc ladspa: simplify registry cache structure creation
Create and fill structure in one go.
2016-06-15 12:14:30 +02:00
Haihua Hu
5e8a650130 gleffects: fix little rectangle that appears at the center of squeeze and tunnel effects
These two shader will calculate the vector length and use it as denominator.
But length could be zero which will cause undefine behaviour. Add protection for
this condition

https://bugzilla.gnome.org/show_bug.cgi?id=767635
2016-06-15 19:18:15 +10:00
Matthew Waters
861ce43cd8 glsl: add some debugging 2016-06-15 18:10:59 +10:00
Matthew Waters
27e4288de4 glutils: remove unused functions for texture creation/deletion
Everyone uses GstGLMemory now and any future code should as well.
2016-06-15 16:08:57 +10:00
Matthew Waters
216b8eea6c glfilter: remove unused class fields in/out_tex_id
The functionality is not used by any subclass nor are the values set anywhere.
2016-06-15 15:47:47 +10:00
Matthew Waters
4010faf4a1 gldeinterlace: remove dead code accessing filter->in_tex_id
It's not set by anyone or anything and gldeinterlace is the only user of it now.
2016-06-15 15:08:39 +10:00
Matthew Waters
6b7f94abb2 gl/upload/meta: remove unneeded texture deletion
The textures are managed by the GstGLMemory inside the output buffer.  Freeing
them prematurely may result in a use-after-free.
2016-06-15 14:40:40 +10:00
Aleix Conchillo Flaqué
15a3b0f6ce srtpenc: remove get-rollover-counter signal and add stats property
We remove get-rollover-counter signal in favor of the "stats"
property. The "stats" property is a GstStructure with caps
application/x-srtp-encoder-stats that contains an array of
structures with caps application/x-srtp-stream.
Each stream structure contains "ssrc" and "roc" fields.

https://bugzilla.gnome.org/show_bug.cgi?id=733265
2016-06-13 14:55:25 +02:00
Mats Lindestam
a0876aa750 h264parse: support for handling of config-interval = -1
Added support for handling of config-interval = -1.
config-inteval = -1 represents resending SPS and PPS for each
I-/IDR-frame.

https://bugzilla.gnome.org/show_bug.cgi?id=766803
2016-06-13 10:10:21 +01:00
Mats Lindestam
bf0d952387 h264parse: refactored handling of SPS/PPS when pushing frames
https://bugzilla.gnome.org/show_bug.cgi?id=766803
2016-06-13 10:10:05 +01:00
Mats Lindestam
0c04e004bb h264parse: change "config-interval" property type from uint to int
So we can use -1 as special value like in rtph264pay.

https://bugzilla.gnome.org/show_bug.cgi?id=766803
2016-06-13 10:08:22 +01:00
Sebastian Dröge
a913a0b967 avfassetsrc: Don't escape the URI before passing it to NSURL
The URI must already be escaped by the caller, we don't support passing around
invalid (unescaped) URIs via the GstURIHandler interface.

Also it will escape too much of the URI in this case, e.g.
  ipod-library://item/item.m4a?id=3143338395173862951
becomes
  ipod-library://item/item.m4a%3Fid%3D3143338395173862951

https://bugzilla.gnome.org/show_bug.cgi?id=767492
2016-06-13 09:21:50 +03:00
Sebastian Dröge
0275007107 iosassetsrc: Print the correct URI if it was rejected
We were printing the previously set URI instead of the new one.
2016-06-13 09:21:50 +03:00
Sebastian Rasmussen
c7e4217121 curlsmtpsink: Lock and don't send final boundary upon error
Previously GstCurlSmtpSink could cause the pipeline thread to end up
waiting for a stopped thread to perform work.

The scenario was that the sink could be rendering a buffer and waiting
for the curl transfer thread to have sent the data. As soon as the
transfer thread has copied all data to curl's data buffer in
gst_curl_base_sink_transfer_read_cb() then the render call would stop
waiting and return GST_FLOW_OK. While this takes place the transfer
thread may suffer from an error e.g. due gst_poll_wait() timing out.
This causes the transfer thread to record the error, claim (it is not
really true since there was an error) that the data has been sent and
that a response has been received by trying to signal the pipeline
thread (but this has already stopped waiting). Finally the transfer
thread stops itself. A short while later the pipeline thread may attempt
to push an EOS event into GstCurlSmtpSink. Since there is no check in
gst_curl_smtp_sink_event() to check if the sink has suffered from any
error it may attempt to add a final boundary and ask the, now deceased,
transfer thread to transfer the new data. Next the sink element would
have waited for the transfer to complete (using a different mechanism
than normal transfers through GstCurlBaseSink). In this case there was
an error check to avoid waiting if an error had already been seen.
Finally GstCurlSmtpSink would chain up to GstCurlBaseSink which would
then block waiting for a response (normally this would be prevented by
the transfer thread suffering the error claiming that it had been
received, but GstCurlSmtpSink clobbered this flag after the fact).

Now GstCurlSmtpSink avoids this by locking over the entire event handing
(preventing simultaneous changes to flags by the two threads) and also
by avoiding to initiate transfer of final boundary if an error has
already been seen.

Also add GST_FIXME() for remaining similar issue where the pipeline
thread may block indefinitely waiting for transfer thread to transfer
data but the transfer thread errors out and fails to notify the pipeline
thread that the transfer failed.

https://bugzilla.gnome.org/show_bug.cgi?id=767501
2016-06-11 11:25:13 +01:00
Aaron Boxer
3dc3a915ea jpeg2000parse: Require either colorspace or sampling field in sink caps
And always set the sampling field on the src caps, if necessary guessing a
correct value for it from the colorspace field.

Also, did some cleanup: removed sampling enum - redundant.

https://bugzilla.gnome.org/show_bug.cgi?id=766236
2016-06-10 16:25:50 +03:00
Heinrich Fink
3107f5df76 facedetect: Fix compiler warning with clang 3.8
Use namespace only after it was actually defined by a header.

gstfacedetect.cpp:79:17: error: using directive refers to implicitly-defined namespace 'std' [-Werror]
using namespace std;
                ^
2016-06-10 11:33:52 +03:00
Reynaldo H. Verdejo Pinochet
ea7c0981ec dvbsrc: unify exit paths on _start() 2016-06-09 14:45:59 -07:00
Reynaldo H. Verdejo Pinochet
33893c5242 dvbsrc: use proper acronym for PID (Packet Identifier)
Drop formatting tab from message while at it.
2016-06-09 14:45:59 -07:00
Reynaldo H. Verdejo Pinochet
c66f5080aa dvbsrc: set common PES filter params once and reuse
Avoid setting the same harcoded values over and over again.
2016-06-09 14:45:59 -07:00
Tim-Philipp Müller
faf6e5a1eb dc1394src: minor clean-up
We always call _parse_caps() with non-NULL out vars.
2016-06-09 22:01:45 +01:00
Tim-Philipp Müller
09737d1874 dc1394src: fix some more c99-isms 2016-06-09 22:01:13 +01:00
Tim-Philipp Müller
c8b7585dce docs: fix for renamed dc1394 source file
https://bugzilla.gnome.org/show_bug.cgi?id=763026
2016-06-09 21:47:58 +01:00
Joan Pau Beltran
3355f5b3ab dc1394src: prefix and file names according to Gstreamer conventions
Replace the type and function prefix to follow the conventions:

  - Use `GST_TYPE_DC1394_SRC` instead of `GST_TYPE_DC1394`.

  - Use `GstDC1394Src` and `GstDC1394SrcClass` instead of
    `GstDc1394` and `GstDc1394Class`.

  - Use `gst_dc1394_src` instead of `gst_dc1394`.

https://bugzilla.gnome.org/show_bug.cgi?id=763026
2016-06-09 21:47:58 +01:00
Joan Pau Beltran
e28b123608 dc1394src: port to 1.X
The dc1394src is a PushSrc element for IIDC cameras based on libdc1394.
The implementation from the 0.x series is deffective:
caps negotiation does not work, and some video formats
provided by the camera are not supported.

Refactor the code to port it to 1.X and enhance the support
for the full set of video options of IIDC cameras:

  - The IIDC specification includes a set of camera video modes
    (video format, frame size, and frame rates).
    They do not map perfectly to Gstreamer formats, but those that
    do not match are very rare (if used at all by any camera).
    In addition, although the specification includes a raw format,
    some cameras use mono video formats to capture in Bayer format.
    Map corresponding video modes to Gstreamer formats in capabilities,
    allowing both gray raw and Bayer video formats for mono video modes.

  - The specification includes scalable video modes (Format7),
    where the frame size and rate can be set to arbitrary values
    (within the limits of the camera and the bus transport).
    Allow the use of such mode, using the frame size and rate
    from the negotiatied caps, and set the camera frame rate
    adjusting the packet size as in:
    <http://damien.douxchamps.net/ieee1394/libdc1394/faq/#How_do_I_set_the_frame_rate>

    The scalable modes also allow for a custom ROI offset.
    Support for it can be easily added later using properties.

  - Camera operation using libdc1394 is as follows:

      1. Enumerate cameras on the system and open the camera
         identified the enumeration index or by a GUID (64bit hex code).

      2. Query the video formats supported by the camera.

      3. Configure the camera for the desired video format.

      4. Setup the capture resources for the configured video format
         and start the camera transmission.

      5. Capture frames from the camera and release them when not used.

      6. Stop the camera transmission and clear the capture resources.

      7. Close the camera freeing its resources.

    Do steps 2 and 3 when getting and setting the caps respectively.
    Ideally 4 and 6 would be done when going from PAUSED to PLAYING
    and viceversa, but since caps might not be set yet, the video mode
    is not properly configured leaving the camera in a broken state.
    Hence, setup capture and start transmission in the set caps method,
    and consequently clear the capture and stop the transmission
    when going from PAUSED to READY (instead of PLAYING to PAUSED).
    Symmetrycally, open the camera when going from READY to PAUSED,
    allowing to probe the camera caps in the negotiation stage.
    Implement that using the `start` and `stop` methods of `GstBaseSrc`,
    instead of the `change-state` method of `GstElement`.
    Stop the camera before setting new caps and restarting it again
    to handle caps reconfiguration while in PLAYING (it has no effect
    if the camera is not started).

  - Create buffers copying the bytes of the captured frames.
    Alternatively, the buffers could just wrap the bytes of the frames,
    releasing the frame in the buffer's destroy notify function,
    if all buffers were destroyed before going from PLAYING to PAUSED.

  - No timestamp nor offset is set when creating buffers.
    Timestamping is delegated to the parent class BaseSrc,
    setting `gst_base_src_set_live` TRUE, `gst_base_src_set_format`
    with GST_FORMAT_TIME and `gst_base_src_set_do_timestamp`.
    Captured frames have a timestamp field with the system time
    at the completion of the transmission of the frame,
    but it is not sure that this comes from a monotonic clock,
    and it seems to be left NULL in Windows.

  - Use GUID and unit properties to select the camera to operate on.
    The camera number used in version 0.X does not uniquely identify
    the device (it depends on the set of cameras currently detected).
    Since the GUID is 64bit identifier (same as MAC address),
    handle it with a string property with its hexadecimal representation.
    For practicality, operate on the first camera available if the GUID
    is null (default) and match any camera unit number if unit is -1.
    Alternatively, the GUID could be handed with an unsigned 64 bit
    integer type property, using `0xffffffffffffffff` as default value
    to select the first camera available (it is not a valid GUID value).

  - Keep name `GstDc1394` and prefix `gst_dc1394` as in version 0.X,
    although `GstDC1394Src` and `gst_dc1394_src` are more descriptive.

  - Adjust build files to reenable the compilation of the plugin.

    Remove dc1394 from the list of unported plugins in configure.ac.

    Add the missing flags and libraries to Makefile.
    Use `$()` for variable substitution, as many plugins do,
    although other plugins use `@@` instead.

https://bugzilla.gnome.org/show_bug.cgi?id=763026
2016-06-09 21:47:58 +01:00
Edward Hervey
deb686cfe1 adaptivedemux: Move SEEK handling to a separate function
Just for code readability. Doesn't change behaviour
2016-06-09 19:25:26 +03:00
Nicolas Dufresne
d33352edb5 webpdec: Wait for segment event before checking it
The heuristic to choose between packetise or not was changed to use the
segment format. The problem is that this change is reading the segment
during the caps event handling. The segment event will only be sent
after. That prevented the decoder to go in packetize mode, and avoid
useless parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=736252
2016-06-07 21:10:04 -04:00
Nicolas Dufresne
50537e2c08 vmncdec: Wait for segment event before checking it
The heuristic to choose between packetise or not was changed to use the
segment format. The problem is that this change is reading the segment
during the caps event handling. The segment event will only be sent
after. That prevented the decoder to go in packetize mode, and avoid
useless parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=736252
2016-06-07 21:05:41 -04:00