Closed
Bug 963458
Opened 11 years ago
Closed 11 years ago
[Media Encoder][b2g-emulator-jb] Cannot record the video stream from fake gUM
Categories
(Core :: Audio/Video: Recording, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: rlin, Assigned: jhlin)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
jhlin
:
review+
|
Details | Diff | Splinter Review |
STR. on emulator-jb, git gecko ver:85b8bb0ff931e
1. get media stream from fake getUserMedia
2. record the media stream
3. got onerror callback
log:
I/OMXClient( 535): Using client-side OMX mux.
I/SoftAVCEncoder( 535): Construct SoftAVCEncoder
I/ACodec ( 535): setupVideoEncoder succeeded
E/ACodec ( 535): [OMX.google.h264.encoder] configureCodec returning error -2147483648
E/MediaCodec( 535): Codec reported an error. (omx error 0x80001001, internalError -2147483648)
I/MediaEncoder( 535): [VideoTrackEncoder]: Fail to initialize the encoder!
I/OMXClient( 535): Using client-side OMX mux.
I/MediaEncoder( 535): [AudioTrackEncoder]: Receive TRACK_EVENT_ENDED .
Updated•11 years ago
|
Blocks: MediaEncoder
Assignee | ||
Comment 1•11 years ago
|
||
SoftAVCEncoder does not support encoding video resolution > CIF (352x288) (See http://androidxref.com/4.3_r2.1/xref/frameworks/av/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp#60). Need to use different AVC/H.264 encoder configuration if running on emulator.
QA Contact: jolin
Assignee | ||
Comment 2•11 years ago
|
||
Incorrectly set QA Contact field in previous editing.
Assignee: nobody → jolin
QA Contact: jolin → jsmith
Assignee | ||
Comment 3•11 years ago
|
||
Use Android system properties API to check if we're running on emulator and adjust parameters accordingly.
Attachment #8374637 -
Flags: review?(roc)
Assignee | ||
Comment 4•11 years ago
|
||
Return error rather than assert/crash when input size too large. (Thanks to feedback from :CJKu and :rlin)
Attachment #8374637 -
Attachment is obsolete: true
Attachment #8374637 -
Flags: review?(roc)
Attachment #8375415 -
Flags: review?(roc)
Attachment #8375415 -
Flags: review?(roc) → review+
Comment on attachment 8375415 [details] [diff] [review]
avc-encoder-config-for-emu.patch
Review of attachment 8375415 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/omx/OMXCodecWrapper.cpp
@@ +132,5 @@
> + OMX_VIDEO_CONTROLRATETYPE bitrateMode = OMX_Video_ControlRateConstant;
> + // Limitation of soft AVC/H.264 encoder running on emulator in stagefright.
> + static bool emu = IsRunningOnEmulator();
> + if (emu) {
> + if (aWidth > 352 || aHeight > 288) {
If software encoder in stagefright can accept VGA resolution in future, code here will block recording pipeline forever.
Another suggestion is instead of return NS_ERROR_INVALID_ARG here, you may
if (aWidth > 352 || aHeight > 288) {
mMayFailedBecauseOfResolutionToBig = true;
}
After getting an unknown error callback from MediaCodec, in error callback function, write this log:
CODEC_ERROR("SoftAVCEncoder doesn't support resolution larger than CIF");
Assignee | ||
Comment 6•11 years ago
|
||
Update commit message & carry r+ from roc.
Attachment #8375415 -
Attachment is obsolete: true
Attachment #8376907 -
Flags: review+
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•11 years ago
|
Component: Video/Audio → Video/Audio: Recording
You need to log in
before you can comment on or make changes to this bug.
Description
•