Closed Bug 1173001 Opened 9 years ago Closed 9 years ago

Make MediaDecoderReader compatible with mirroring

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(4 files, 2 obsolete files)

This is necessary in order to support mirroring in MediaDecoderReader.
This is a necessary step towards having mirrored/canonical values, since those
need to know the task queue in their constructor.
Attachment #8617413 - Flags: review?(jwwang)
Generalizing the bug a bit.
Summary: Create the decode task queue in the reader's constructor → Make MediaDecoderReader compatible with mirroring
Comment on attachment 8617413 [details] [diff] [review]
Part 1 - Initialize reader task queue in the constructor. v1

This is going to need some tweaking.
Attachment #8617413 - Attachment is obsolete: true
Attachment #8617413 - Flags: review?(jwwang)
While at it, it would be great if the task queue constructor could be called on something else but the main thread.

As it reads a preference to find out the size of the threads pool, this asserts when called on a thread other than the main thread.
(In reply to Jean-Yves Avenard [:jya] from comment #5)
> While at it, it would be great if the task queue constructor could be called
> on something else but the main thread.

That seems like a good thing to fix, but I don't plan on doing it in this bug.
This will allow us to pass the borrowed task queue. It's also more explicit
about the fact that we only support mp4 and (sort of) webm.
Attachment #8617697 - Flags: review?(jwwang)
This is a necessary step towards having mirrored/canonical values, since those
need to know the task queue in their constructor.
Attachment #8617698 - Flags: review?(jwwang)
Attachment #8617697 - Flags: review?(jwwang) → review+
Comment on attachment 8617698 [details] [diff] [review]
Part 2 - Initialize reader task queue in the constructor. v1

Review of attachment 8617698 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/MediaDecoderReader.h
@@ +312,5 @@
>    // Reference to the owning decoder object.
>    AbstractMediaDecoder* mDecoder;
>  
> +  // Decode task queue.
> +  nsRefPtr<MediaTaskQueue> mTaskQueue;

Why changing from private to protected?
Attachment #8617698 - Flags: review?(jwwang) → review+
Attachment #8617699 - Flags: review?(jwwang) → review+
Attachment #8617700 - Flags: review?(jwwang) → review+
(In reply to JW Wang [:jwwang] from comment #11)
> Why changing from private to protected?

It's just about the initialization order - the task queue needs to be initialized early so that mirror initializers can use it.
See Also: → 1173660
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: