Closed
Bug 941274
Opened 12 years ago
Closed 12 years ago
Fix ResetDecode() in gonk to be consistent to other platofroms
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: sotaro, Assigned: sotaro)
Details
Attachments
(1 file, 2 obsolete files)
|
3.73 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
In gonk, ResetDecode() is used to flush video and audio buffers in media framework and also graphics pipe line. But this api expect to flush only flush video audio buffers in media framework. And MediaOmxReader::Seek() does flush video and audio buffers in media framework without using ResetDecode().
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → sotaro.ikeda.g
| Assignee | ||
Comment 1•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Version: 26 Branch → Trunk
| Assignee | ||
Updated•12 years ago
|
Attachment #8340110 -
Flags: review?(chris.double)
Comment 3•12 years ago
|
||
Comment on attachment 8340110 [details] [diff] [review]
patch - Fix ResetDecode in MediaOmxReader
Review of attachment 8340110 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/omx/MediaOmxReader.cpp
@@ +176,5 @@
> return NS_OK;
> }
>
> // Resets all state related to decoding, emptying all buffers etc.
> nsresult MediaOmxReader::ResetDecode()
Do you have to do anything here to flush partially decoded frames in libstagefright's decoder? Otherwise p-frames after the seek may reference the wrong frame?
Should you call container->GetImageContainer()->ClearAllImagesExceptFront() here instead of in Seek()?
| Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #3)
> Comment on attachment 8340110 [details] [diff] [review]
> patch - Fix ResetDecode in MediaOmxReader
>
> Review of attachment 8340110 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: content/media/omx/MediaOmxReader.cpp
> @@ +176,5 @@
> > return NS_OK;
> > }
> >
> > // Resets all state related to decoding, emptying all buffers etc.
> > nsresult MediaOmxReader::ResetDecode()
>
> Do you have to do anything here to flush partially decoded frames in
> libstagefright's decoder? Otherwise p-frames after the seek may reference
> the wrong frame?
The partially decoded frame in the decoder is automatically freed by seek read like the following.
> MediaSource::ReadOptions options;
> options.setSeekTo(aTimeUs, MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC);
> err = mVideoSource->read(&mVideoBuffer, &options);
http://mxr.mozilla.org/mozilla-central/source/content/media/omx/OmxDecoder.cpp#743
> Should you call container->GetImageContainer()->ClearAllImagesExceptFront()
> here instead of in Seek()?
Do not need to call ClearAllImagesExceptFront() in ResetDecode(). ResetDecode() does not know how much flush graphic pipe line. Seek() need to flush all video frames except front. But before destroy the video codec, need to flush all video frames.
Comment 5•12 years ago
|
||
In that case, you don't need to override MediaOmxReader::ResetDecode(). MediaOmxReader::ResetDecode() just calls MediaDecoderReader::ResetDecode(), but that will happen anyway if you remove MediaOmxReader::ResetDecode().
| Assignee | ||
Comment 6•12 years ago
|
||
Yeah, I will update the patch.
| Assignee | ||
Comment 7•12 years ago
|
||
Remove unnecessary MediaOmxReader::ResetDecode().
| Assignee | ||
Updated•12 years ago
|
Attachment #8340110 -
Attachment is obsolete: true
Attachment #8340110 -
Flags: review?(chris.double)
| Assignee | ||
Updated•12 years ago
|
Attachment #8340134 -
Flags: review?(chris.double)
Updated•12 years ago
|
Attachment #8340134 -
Flags: review?(chris.double) → review+
| Assignee | ||
Comment 8•12 years ago
|
||
| Assignee | ||
Comment 9•12 years ago
|
||
Committable patch. Carry "doublec review+".
Attachment #8340134 -
Attachment is obsolete: true
Attachment #8341441 -
Flags: review+
| Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 10•12 years ago
|
||
Keywords: checkin-needed
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in
before you can comment on or make changes to this bug.
Description
•