Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Unified Diff: media/base/android/media_codec_player.h

Issue 1132973002: Revert of Added stub MediaSourcePlayer for developing behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/BUILD.gn ('k') | media/base/android/media_codec_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_player.h
diff --git a/media/base/android/media_codec_player.h b/media/base/android/media_codec_player.h
deleted file mode 100644
index 518adbbbd8b17874e398fde3d9481762db02b4d9..0000000000000000000000000000000000000000
--- a/media/base/android/media_codec_player.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_
-#define MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_
-
-#include "base/android/scoped_java_ref.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/thread.h"
-#include "media/base/android/demuxer_android.h"
-#include "media/base/android/media_player_android.h"
-#include "media/base/media_export.h"
-#include "ui/gl/android/scoped_java_surface.h"
-
-namespace media {
-
-class BrowserCdm;
-
-// Returns the task runner for the media thread
-MEDIA_EXPORT scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner();
-
-
-// This class implements the media player using Android's MediaCodec.
-// It differs from MediaSourcePlayer in that it removes most
-// processing away from UI thread: it uses a dedicated Media thread
-// to receive the data and to handle commands.
-class MEDIA_EXPORT MediaCodecPlayer : public MediaPlayerAndroid,
- public DemuxerAndroidClient {
- public:
- // Constructs a player with the given ID and demuxer. |manager| must outlive
- // the lifetime of this object.
- MediaCodecPlayer(int player_id,
- MediaPlayerManager* manager,
- const RequestMediaResourcesCB& request_media_resources_cb,
- scoped_ptr<DemuxerAndroid> demuxer,
- const GURL& frame_url);
- ~MediaCodecPlayer() override;
-
- // MediaPlayerAndroid implementation.
- void DeleteOnCorrectThread() override;
- void SetVideoSurface(gfx::ScopedJavaSurface surface) override;
- void Start() override;
- void Pause(bool is_media_related_action) override;
- void SeekTo(base::TimeDelta timestamp) override;
- void Release() override;
- void SetVolume(double volume) override;
- int GetVideoWidth() override;
- int GetVideoHeight() override;
- base::TimeDelta GetCurrentTime() override;
- base::TimeDelta GetDuration() override;
- bool IsPlaying() override;
- bool CanPause() override;
- bool CanSeekForward() override;
- bool CanSeekBackward() override;
- bool IsPlayerReady() override;
- void SetCdm(BrowserCdm* cdm) override;
-
- // DemuxerAndroidClient implementation.
- void OnDemuxerConfigsAvailable(const DemuxerConfigs& params) override;
- void OnDemuxerDataAvailable(const DemuxerData& params) override;
- void OnDemuxerSeekDone(base::TimeDelta actual_browser_seek_time) override;
- void OnDemuxerDurationChanged(base::TimeDelta duration) override;
-
- // Helper methods
- void Initialize();
- void DestroySelf();
-
- private:
- // Object for posting tasks on UI thread.
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
-
- scoped_ptr<DemuxerAndroid> demuxer_;
-
- base::WeakPtr<MediaCodecPlayer> weak_this_;
- // NOTE: Weak pointers must be invalidated before all other member variables.
- base::WeakPtrFactory<MediaCodecPlayer> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaCodecPlayer);
-};
-
-} // namespace media
-
-#endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_
« no previous file with comments | « media/base/android/BUILD.gn ('k') | media/base/android/media_codec_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698