Closed Bug 957910 Opened 11 years ago Closed 7 years ago

[Camera] Killing the camera records no video

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gweng, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached video Cant_see_different.ogv (obsolete) —
STR:

1. In camera, recording video
2. Long press home key
3. Kill the camera in the card view as soon as possible

Expected:

The recoded video is in the Gallery and Video

Actual:

1. The video would not present in Gallery but in Video (the same with Bug 949853).
2. If it leaves really even sooner than the case #1, both Gallery and Video would hold no video. But it does appear in the filesystem, and was broken (can't be played on desktop and the phone).

This block Bug 949853, because this behavior is shared between these two camera. The difference is that in LockScreen, camera leaving by pressing home key would really kill the camera (so the symptom would be produced easier), but in real Camera app it would only push the app to the background, and leave some time to let it finish the job.
Attached video The_video_recorded
This is the recorded video that can't be played (case #2 in STR).
Blocks: 949853
Greg,

You uploaded wrong file. The Cant_see_different.ogv is not about this bug.
The header of VID_0008.3gp is broken, the followings are dumped by ffmpeg:

moov atom not found
VID_0008.3gp: Invalid data found when processing input
Ohhhh sorry, I attached wrong file.
Attachment #8357561 - Attachment is obsolete: true
When the Camera process is killed, the callbacks for completing the writing of the video file to storage cannot be called. This was the exact cause of the issue where recording a video from a passcode-locked lockscreen would not be saved if the user tapped the Home button (secure mode apps were being killed immediately). A fix was supplied in Bug 1019120 which essentially puts the Camera app to the background and allows sufficient time to pass for all file writing operations to complete before terminating the process. However, this fix is only applicable towards secure mode apps (from the lockscreen). I guess it could technically be possible to do something similar for regular app processes/frames, but this might require some additional considerations on low-memory devices.
I keep thinking that maybe we can spawn a helper process and run the MPEG4Writer in that, independent of the life-span of the Camera app. That way, if the Camera app gets killed, the helper process can detect the death and commit the video file with a proper trailer structure.

This is way out of scope for 2.1, however.
Summary: [Camera] Quit camera hurriedly would record no video → [Camera] Killing the camera records no video
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: