| Index: chromecast/public/media/media_pipeline_device_params.h
|
| diff --git a/chromecast/media/cma/backend/media_pipeline_device_params.h b/chromecast/public/media/media_pipeline_device_params.h
|
| similarity index 54%
|
| rename from chromecast/media/cma/backend/media_pipeline_device_params.h
|
| rename to chromecast/public/media/media_pipeline_device_params.h
|
| index d13e4e3a188b948829e4886b96f1e0d7c2baba6c..fa7779bb6bf700f6ab1507595d8f3e65b71bd8a0 100644
|
| --- a/chromecast/media/cma/backend/media_pipeline_device_params.h
|
| +++ b/chromecast/public/media/media_pipeline_device_params.h
|
| @@ -2,16 +2,16 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_
|
| -#define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_
|
| +#ifndef CHROMECAST_PUBLIC_MEDIA_MEDIA_PIPELINE_DEVICE_PARAMS_H_
|
| +#define CHROMECAST_PUBLIC_MEDIA_MEDIA_PIPELINE_DEVICE_PARAMS_H_
|
|
|
| -#include "base/macros.h"
|
| +#include "task_runner.h"
|
|
|
| namespace chromecast {
|
| namespace media {
|
|
|
| -class MediaPipelineDeviceParams {
|
| - public:
|
| +// Supplies creation parameters to platform-specific pipeline backend.
|
| +struct MediaPipelineDeviceParams {
|
| enum MediaSyncType {
|
| // Default operation, synchronize playback using PTS with higher latency.
|
| kModeSyncPts = 0,
|
| @@ -27,10 +27,20 @@ class MediaPipelineDeviceParams {
|
| kModeIgnorePtsAndVSync = 2,
|
| };
|
|
|
| - MediaPipelineDeviceParams();
|
| - ~MediaPipelineDeviceParams();
|
| + MediaPipelineDeviceParams(TaskRunner* task_runner_in)
|
| + : sync_type(kModeSyncPts), task_runner(task_runner_in) {}
|
|
|
| - MediaSyncType sync_type;
|
| + MediaPipelineDeviceParams(MediaSyncType sync_type_in,
|
| + TaskRunner* task_runner_in)
|
| + : sync_type(sync_type_in), task_runner(task_runner_in) {}
|
| +
|
| + const MediaSyncType sync_type;
|
| +
|
| + // task_runner allows backend implementations to post tasks to the media
|
| + // thread. Since all calls from cast_shell into the backend are made on
|
| + // the media thread, this may simplify thread management and safety for
|
| + // some backends.
|
| + TaskRunner* const task_runner;
|
| };
|
|
|
| } // namespace media
|
|
|