Merge lp:~fboucault/qtubuntu-camera/no_black_screens into lp:qtubuntu-camera

Proposed by Florian Boucault
Status: Merged
Approved by: Bill Filler
Approved revision: 99
Merged at revision: 99
Proposed branch: lp:~fboucault/qtubuntu-camera/no_black_screens
Merge into: lp:qtubuntu-camera
Diff against target: 60 lines (+2/-16)
2 files modified
src/aalcameraservice.cpp (+2/-15)
src/aalcameraservice.h (+0/-1)
To merge this branch: bzr merge lp:~fboucault/qtubuntu-camera/no_black_screens
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+227601@code.launchpad.net

Commit message

Fixed disconnection so that it always happens and reconnection always works.
Removed never executed code that was supposed to work around deletion issues.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, works

review: Approve
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Looks good, thanks

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/aalcameraservice.cpp'
2--- src/aalcameraservice.cpp 2014-07-08 15:12:58 +0000
3+++ src/aalcameraservice.cpp 2014-07-21 15:59:58 +0000
4@@ -39,8 +39,7 @@
5 AalCameraService::AalCameraService(QObject *parent):
6 QMediaService(parent),
7 m_androidControl(0),
8- m_androidListener(0),
9- m_oldAndroidControl(0)
10+ m_androidListener(0)
11 {
12 m_service = this;
13
14@@ -77,8 +76,6 @@
15 delete m_videoOutput;
16 delete m_viewfinderControl;
17 delete m_exposureControl;
18- if (m_oldAndroidControl)
19- android_camera_delete(m_oldAndroidControl);
20 if (m_androidControl)
21 android_camera_delete(m_androidControl);
22 delete m_storageManager;
23@@ -148,15 +145,6 @@
24 if (m_androidControl)
25 return true;
26
27- if (m_oldAndroidControl){
28- /// FIXME
29- /// becasue android_camera_disconnect() is asynchronous, it's not deleted directly when calling disconnect
30- /// properly implemented, whe should be notified when it can be deleted
31- /// in case 2 switches happend very fast, this delete might happen too eraly
32- android_camera_delete(m_oldAndroidControl);
33- }
34- m_oldAndroidControl = m_androidControl;
35-
36 CameraType device = BACK_FACING_CAMERA_TYPE;
37 if (!isBackCameraUsed())
38 device = FRONT_FACING_CAMERA_TYPE;
39@@ -190,8 +178,7 @@
40
41 void AalCameraService::disconnectCamera()
42 {
43- if (m_service->videoOutputControl()->isViewfinderRunning())
44- m_service->videoOutputControl()->stopPreview();
45+ m_service->videoOutputControl()->stopPreview();
46
47 if (m_androidControl) {
48 android_camera_disconnect(m_androidControl);
49
50=== modified file 'src/aalcameraservice.h'
51--- src/aalcameraservice.h 2014-07-08 15:12:58 +0000
52+++ src/aalcameraservice.h 2014-07-21 15:59:58 +0000
53@@ -105,7 +105,6 @@
54
55 CameraControl *m_androidControl;
56 CameraControlListener *m_androidListener;
57- CameraControl *m_oldAndroidControl;
58
59 StorageManager *m_storageManager;
60 };

Subscribers

People subscribed via source and target branches