Commit Graph

2034 Commits

Author SHA1 Message Date
Andrew Branson
c0ab4fd8c6 Merge branch 'jb47099' into 'mer-5.6'
[playback] Emit missing-plugin codec descriptions as QMediaPlayer::FormatErrors. JB#47099

See merge request mer-core/qtmultimedia!32
Change-Id: I9af46f3d04f1ff19ae0615b73a4fec3ab1ee90df
2019-12-19 21:41:48 +01:00
Andrew Branson
5a7951ad80 codecs: Report missing codecs to applications.
[playback] Emit missing-plugin codec descriptions as QMediaPlayer::FormatErrors. JB#47099

Remove the old vague message on playback failure, as it's no longer needed. And a duplicated include.

Change-Id: I0c515bd8e4de6d2e2c5966aa776219f5200353a9
2019-12-19 18:20:48 +01:00
Andrew Branson
93ec8cd223 Merge branch 'jb47801' into 'mer-5.6'
[media] Enable debug graph dot file dumping for playback. JB#47801

See merge request mer-core/qtmultimedia!31
2019-12-05 09:19:47 +00:00
Andrew Branson
6d75e0f87b [media] Enable debug graph dot file dumping for playback. JB#47801
Change-Id: I0c7ad6ebf72f3ae6baea3eeb431abd55914a7ee0
2019-11-21 14:01:23 +01:00
pvuorela
62d01da834 Merge branch 'mer/fix-updatemaxzoom' into 'mer-5.6'
Gstreamer: correct signal name in CameraBinZoom::updateZoom

See merge request mer-core/qtmultimedia!29
2019-11-20 11:22:07 +00:00
Ratchanan Srirattanamet
aac3740909 Gstreamer: correct signal name in CameraBinZoom::updateZoom
updateZoom() is supposed to notify the change in maximum digital zoom.
Instead of emitting "currentDigitalZoomChanged", it emits "maximum
OpticalZoomChanged" signal instead.
2019-10-10 22:13:16 +07:00
Andrew Branson
d8f447c93a Merge branch 'jb47243' into 'mer-5.6'
[debug] Fix debug graph dot file dumping. JB#47243

See merge request mer-core/qtmultimedia!28
2019-09-11 12:53:16 +00:00
Andrew Branson
32e770278a [debug] Fix debug graph dot file dumping. JB#47243 2019-09-11 14:43:38 +02:00
Andrew den Exter
d9ad195134 Merge branch 'jb42936' into 'mer-5.6'
Fix crashes and lockups caused by changing the capture mode during an image capture

See merge request mer-core/qtmultimedia!20
2019-06-19 01:07:14 +00:00
Juho Hamalainen
0bfd098f10 Merge branch 'mer-5.6-dev' into 'mer-5.6'
Resource policy improvements.

See merge request mer-core/qtmultimedia!26
2019-05-21 07:50:37 +00:00
Juho Hämäläinen
97dce56955 [resourcepolicy] Allow all known resource classes. JB#45899 2019-05-21 09:56:34 +03:00
Juho Hämäläinen
4ec3bf7e9e [resourcepolicy] Add option to disable internal resource handling. JB#45899 2019-05-21 09:46:06 +03:00
Matti Lehtimäki
0e267b073f Merge branch 'jb45747' into 'mer-5.6'
[camera] Emit imageExposed signal at the right time. JB#45747

See merge request mer-core/qtmultimedia!25
2019-05-10 20:01:10 +00:00
Andrew Branson
35cc837acf [camera] Emit imageExposed signal at the right time. JB#45747
Droidmedia supports a callback to indicate the exact moment when the shutter fires, and this is passed on as a GstMessage by Gst-droid. There is already an imageExposed signal being emitted from QGstreamerCaptureSession, but it's only sent when the image is finished, right before imageCaptured. This class already parses GstMessages, so we can move the imageExposed signal to be sent when the shutter actually fires. This can trigger the shutter sound and animation in camera apps as intended.
2019-05-10 14:49:25 +02:00
Andrew Branson
4e11de452b Merge branch 'mer1976' into 'mer-5.6'
[deps] Drop adaptation specific gst-droid dependency. MER#1976

See merge request mer-core/qtmultimedia!24
2019-05-06 13:53:27 +00:00
Andrew Branson
8ae2b6ba2b [deps] Drop adaptation specific gst-droid dependency. MER#1976 2019-05-06 15:47:13 +02:00
Andrew Branson
895bf4d33d Merge branch 'mer1976' into 'mer-5.6'
[media] Fix gstreamer dependency versions. MER#1976

See merge request mer-core/qtmultimedia!23
2019-05-06 12:58:34 +00:00
Andrew Branson
84a7a56427 [media] Fix gstreamer dependency versions. MER#1976 2019-05-06 14:43:42 +02:00
Andrew Branson
670941eb52 Merge branch 'fixes' into 'mer-5.6'
[declarative] Add missing enums to declarative camera MER#1976

See merge request mer-core/qtmultimedia!22
2019-05-06 07:38:38 +00:00
Adam Pigg
80f7ecabd3 [declarative] Add missing enums to declarative camera MER#1976 2019-04-15 22:09:30 +01:00
pvuorela
da7b437606 Merge branch 'plugins' into 'mer-5.6'
Make -devel package depend on plugins

See merge request mer-core/qtmultimedia!17
2019-04-04 11:28:55 +00:00
Andrew Branson
63e071957b Merge branch 'mer-5.6-gst-properties' into 'mer-5.6'
Mer 5.6 gst properties

See merge request mer-core/qtmultimedia!19
2018-12-13 13:03:26 +00:00
Adam Pigg
662f758526 [camerabin] Implement retrieval of supported camera features MER#1976
scene-modes
flash-modes
focus-modes
effects
white-balance-modes
iso-values
2018-12-12 22:16:10 +00:00
Andrew den Exter
5deb9dda60 [camera] Fix crashes and lockups caused by changing the capture mode during an image capture. Contributes to JB#42936
A camera source may reject changing the mode while it is busy leaving
the the camerabin plugin in a state inconsistent with the gstreamer
pipeline which can lead to attempts to record video in the image
capture mode and ultimately a lockup.

Changing any of the source resolutions requires putting the pipeline
into the the READY state to apply the changes. If this happened during
a capture the state change was deferred and the internal plugin state
was restored to active before the capture finished and the state changes
were treated as a no-op and the resolution change wasn't applied leading
to an attempt to record video with an unsupported resolution set for
the image capture mode. So if a change to a lower state is requested
and the plugin is unable to process it immediately still defer the
change but ensure the pipeline is still dropped to the lowest requested
state before being restored to the current requested state so that
any changes made on state transitions are applied.
2018-11-28 22:14:16 -05:00
Alexey Rochev
f1a557e125 [packaging] make -devel package depend on plugins 2018-09-10 21:59:03 +03:00
Slava Monich
1428794048 Merge branch 'leaks-5.6' into 'mer-5.6'
Fix memory leaks

See merge request mer-core/qtmultimedia!15
2018-05-02 14:55:43 +00:00
Slava Monich
f17f824b68 [qtmultimedia] Fixed memory leak in QGstreamerPlayerSession. Fixes JB#41822
==25456== 83 bytes in 1 blocks are definitely lost in loss record 7,587 of 8,690
==25456==    at 0x483F3EC: malloc (vg_replace_malloc.c:299)
==25456==    by 0x5AF00DF: g_malloc (gmem.c:94)
==25456==    by 0x5B07185: g_strdup (gstrfuncs.c:363)
==25456==    by 0x5A87EC3: value_lcopy_string (gvaluetypes.c:312)
==25456==    by 0x5A6B607: g_object_get_valist (gobject.c:2234)
==25456==    by 0x5A6B7F3: g_object_get (gobject.c:2322)
==25456==    by 0x10241575: QGstreamerPlayerSession::playlistTypeFindFunction(_GstTypeFind*, void*) (qgstreamerplayersession.cpp:1901)
2018-05-02 16:40:38 +03:00
Christian Strømme
f0f5cfe307 Fix memory leak in CameraBinImageCapture
The element name needs to be released when we're done with it.

Change-Id: I650671288bd143551188094b0d934e7da2028a2d
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2018-05-02 14:46:08 +03:00
chriadam
94614bc00a Merge branch 'jb36676' into 'mer-5.6'
[qtmultimedia] Don't append suggested extension if filename includes extension. Contributes to JB#36676

Commit 6b19a24b58 changed the way that the file name is composed
for a video recording, so that a suggested extension for the given
media format is appended to the file name.  That introduced a bug
in the case where the correct extension was already part of the
output location (filename) set for the sink, by causing a second
(and possibly incorrect) extension to be appended to the filename.

This commit ensures that if the filename already has a suffix, no
suggested extension is appended.

Contributes to JB#36676

See merge request !12
2016-11-10 04:26:17 +00:00
Chris Adams
57f20e65ec [qtmultimedia] Don't append suggested extension if filename includes extension. Contributes to JB#36676
Commit 6b19a24b58 changed the way that the file name is composed
for a video recording, so that a suggested extension for the given
media format is appended to the file name.  That introduced a bug
in the case where the correct extension was already part of the
output location (filename) set for the sink, by causing a second
(and possibly incorrect) extension to be appended to the filename.

This commit ensures that if the filename already has a suffix, no
suggested extension is appended.

Contributes to JB#36676
2016-10-31 14:17:32 +10:00
Juho Hämäläinen
a70278b12b [packaging] Require new libresourceqt. JB#35838 2016-10-06 21:36:19 +00:00
Juho Hämäläinen
ed12ac3527 [camerabin] When using resource policy need RearFlashlight as well. JB#35838 2016-10-06 21:36:19 +00:00
Mohammed Hassan
da15fb57ed [qtmultimedia] disable v4l test to prevent enabling v4l. Fixes JB#34605
On some Android adaptation based devices (Like Jolla1) accessing v4l2 devices
can cause crashes.
Since we don't use V4L for anything and our media pipelines depend on GStreamer, it should
be safe to disable V4L.
2016-10-06 21:36:19 +00:00
Mohammed Hassan
1f90ee5518 [camera] Account for errors reported by camera source. Contributes to JB#35616
There are errors which can occur during manipulating camera HW.
camerabin does not relay any errors and it is the responsibility of camerabin
user to handle those errors. We just react to them and propagate them farther.
2016-10-06 21:36:19 +00:00
Mohammed Hassan
46c29f5b0b nemo: gstreamer: take into account ready-for-capture property when we are calculating the final state 2016-10-06 21:36:19 +00:00
Mohammed Hassan
b04854b489 nemo: Add basic ready-for-capture handling to CameraBinSession
This property is provided and controlled by the camera source and should be used to tell
whether the camera source can capture more or not

Conflicts:
	src/plugins/gstreamer/camerabin/camerabinsession.h
2016-10-06 21:36:19 +00:00
Mohammed Hassan
1992c78705 nemo: Add support for camera torch mode
This is based on the work by Dmytro Poplavskiy
Original patch URL: https://codereview.qt-project.org/#/c/5503/1
2016-10-06 21:36:18 +00:00
Mohammed Hassan
3a328a2ff3 [qtmultimedia] don't stop recording pipeline blindly if we are unloading. Fixes JB#32434
This is an extension to commit c09756
If we set the state to Unloaded then the check in setState() for the busy pipeline
will be missed.
2016-10-06 21:36:18 +00:00
Mohammed Hassan
c6886bc00d [qtmultimedia] Don't seek to the beginning when we set a new media. Fixes JB#30723
There is no need to do any seeking since we will restart the pipeline which will
cause GStreamer to start playback from the beginning. We just invalidate any potential
pending seek request.
2016-10-06 21:36:18 +00:00
Mohammed Hassan
6ecbfc3cb1 [qtmultimedia] don't stop the camera pipeline until it's done recording. Fixes JB#30862
stopping video recording is asynchronous. Aan EOS event gets sent from camera source,
travels across the whole pipeline until it reaches the muxer which then finalizes the
file by writing the mov atom and friends and then pushes the EOS event farther downstream
until it reaches our file writer (multifilesink in our case).

The sink sends an EOS _message_ which is then caught by camerabin and causes it to flip the
idle property from FALSE to TRUE.

Any attempt to stop the pipeline before this property gets flipped will cause corrupted videos.
Probably because the muxer gets shut down before it gets the EOS event so it does not write the
needed header.

When we are unloading camera we stop video recording and immediately switch camera bin to NULL state.
This can lead to corrupted files. A more proper solution would be to postpone this pipeline tear down
until we are idle.
Since an application can attempt to start the pipeline again before it's completely unloaded, I have added
a check to make sure we never tear down the pipeline if we are not in unloaded state. This check is also needed
because we will be notified about the idle property change while we are loading the camera and we should
not unload it when that happens.

This also required removing the pipeline state change to NULL when we are loading camera.
2016-10-06 21:36:18 +00:00
Mohammed Hassan
770e009cff Mer: disable camerabin previews handling
Our camera source does not yet support generating previews thus enabling it without
a proper support from the source leads to issues with processing counter and camerabin
never reaching idle state.
2016-10-06 21:36:18 +00:00
Mohammed Sameer
3ae638fdea [qtmultimedia] don't play with sink sync property. Contributes to JB#30082
I cannot find a reason why someone would flip sync to false and git history
does not say much but in general. Just don't play with it as it can cause
an av desync in case we are using a live source
2016-10-06 21:36:18 +00:00
Juho Hämäläinen
1d2a4045a2 Do not try to acquire resources in setMedia() in mediaplayer.
Acquire() is called in play() anyway.

Change-Id: I4c6688006d74490d774813b3f1fb381d915ffe23
2016-10-06 21:36:18 +00:00
Juho Hämäläinen
9a188059eb More thorough handling of VideoResourceType.
Add proper application pid for VideoResource upon resource object
creation. Also handle VideoResource when removing resource client.

Change-Id: I1c19c875c2d7d3d29aa9426b092081e3fdf47588
2016-10-06 21:36:18 +00:00
Juho Hämäläinen
e9c2cce662 Maintain proper internal state when releasing resources.
Previously when releasing resources when resources were in "acquiring"
state left the internal status in broken state. Because of this calling
acquire() would not really call acquire from Resource Policy. Change the
implementation so that client state is always set to Initial when
calling release(), but call Resource Policy release() only when no clients
are in acquiring or granted state.

Change-Id: I7fb84aefb64da84808375515950a28331531a71e
2016-10-06 21:36:18 +00:00
Mohammed Hassan
a756991a42 [qtmultimedia] fix capsForFormats to generate caps permitting caps features. Fixes JB#29720 2016-10-06 21:36:18 +00:00
Mohammed Hassan
4806e55411 [qtmultimedia] MER: Disable exposure and white balance locks for now. Fixes JB#29490
They are unsupported and cause the search and lock status to always be set to unlocked

We disable it now until we implement it later in droidcamsrc

Conflicts:
	src/plugins/gstreamer/camerabin/camerabinlocks.cpp
2016-10-06 21:36:18 +00:00
Mohammed Sameer
9a1e40c211 apply encoding settings when we load camera
If we do not apply those then setting camerabin to READY will fail on SailfishOS because
our camera source does not produce standard YUV data and the default constructed camerabin
encoding profile will not work. This will lead to a situation where camera will never work
2016-10-06 21:36:18 +00:00
Mohammed Hassan
c895f17f7b don't seek if the current position is the same 2016-10-06 21:36:18 +00:00
Mohammed Hassan
a824c2da1a watch for zoom and max-zoom property changes.
camerabin can signal a change in those properties and we need to communicate those back to the application
2016-10-06 21:36:18 +00:00