From: Piotr Tworek Date: Tue, 3 Mar 2015 06:19:04 +0000 (+0900) Subject: Migrate multimedia support code to new chromium_impl structure. X-Git-Tag: submit/tizen/20201118.160233~1125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb4ed5304b5274739808b488dd296ebfb6282f88;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Migrate multimedia support code to new chromium_impl structure. The code implements internal chromium interfaces so it belongs in chromium part of new project structure. The expectation is it'll be possible to use it from both xwalk/content_shell and EWK. Due to the fact that xwalk gyp files (xwalk/build/xwalk_filename_rules.gypi) exclude files with tizen in their path from build if tizen gyp variable is set to 0 the code had to be renamed. These files were renamed to have the "efl" suffix instead, given that there were no Tizen specific (desktop build also builds them). This way we still keep the ability to build and test the code on desktop. Change-Id: Ic967fb97131152494520ac9232b986126918c969 Signed-off-by: Piotr Tworek Signed-off-by: Taeho Kim --- diff --git a/tizen_src/build/system.gyp b/tizen_src/build/system.gyp index 9d8689e..7279a7a 100644 --- a/tizen_src/build/system.gyp +++ b/tizen_src/build/system.gyp @@ -216,5 +216,46 @@ }], ], }, # libtbm + { + 'target_name': 'gstreamer', + 'type': 'none', + 'conditions': [ + ['chromium_efl_tizen_version >= "2.4"', { + 'variables': { + 'dependent_pkgs': [ + 'gstreamer-1.0', + 'gstreamer-base-1.0', + 'gstreamer-app-1.0', + 'gstreamer-pbutils-1.0', + 'gstreamer-video-1.0', + ], + }, + }, { # for Tizen v2.X + 'variables': { + 'dependent_pkgs': [ + 'gstreamer-0.10', + 'gstreamer-base-0.10', + 'gstreamer-app-0.10', + 'gstreamer-pbutils-0.10', + 'gstreamer-interfaces-0.10', + 'gstreamer-video-0.10', + ], + }, + }] + ], + 'direct_dependent_settings': { + 'cflags': [ + '& demuxer, + Internal(const scoped_refptr& demuxer, int demuxer_client_id) : demuxer_(demuxer), demuxer_client_id_(demuxer_client_id) { } @@ -19,8 +20,8 @@ class BrowserDemuxerTizen::Internal : public media::DemuxerTizen { demuxer_->RemoveDemuxerClient(demuxer_client_id_); } - // media::DemuxerTizen implementation. - virtual void Initialize(media::DemuxerTizenClient* client) override { + // media::DemuxerEfl implementation. + virtual void Initialize(media::DemuxerEflClient* client) override { DCHECK(!ClientIDExists()) << demuxer_client_id_; demuxer_->AddDemuxerClient(demuxer_client_id_, client); } @@ -50,18 +51,18 @@ class BrowserDemuxerTizen::Internal : public media::DemuxerTizen { return demuxer_->demuxer_clients_.Lookup(demuxer_client_id_); } - scoped_refptr demuxer_; + scoped_refptr demuxer_; int demuxer_client_id_; DISALLOW_COPY_AND_ASSIGN(Internal); }; -BrowserDemuxerTizen::BrowserDemuxerTizen() - : BrowserMessageFilter(MediaPlayerTizenMsgStart) {} +BrowserDemuxerEfl::BrowserDemuxerEfl() + : BrowserMessageFilter(MediaPlayerEflMsgStart) {} -BrowserDemuxerTizen::~BrowserDemuxerTizen() {} +BrowserDemuxerEfl::~BrowserDemuxerEfl() {} -void BrowserDemuxerTizen::OverrideThreadForMessage( +void BrowserDemuxerEfl::OverrideThreadForMessage( const IPC::Message& message, BrowserThread::ID* thread) { switch (message.type()) { @@ -75,9 +76,9 @@ void BrowserDemuxerTizen::OverrideThreadForMessage( } } -bool BrowserDemuxerTizen::OnMessageReceived(const IPC::Message& message) { +bool BrowserDemuxerEfl::OnMessageReceived(const IPC::Message& message) { bool handled = true; - IPC_BEGIN_MESSAGE_MAP(BrowserDemuxerTizen, message) + IPC_BEGIN_MESSAGE_MAP(BrowserDemuxerEfl, message) IPC_MESSAGE_HANDLER(MediaPlayerGstHostMsg_DemuxerReady, OnDemuxerReady) IPC_MESSAGE_HANDLER(MediaPlayerGstHostMsg_ReadFromDemuxerAck, OnReadFromDemuxerAck) @@ -92,67 +93,67 @@ bool BrowserDemuxerTizen::OnMessageReceived(const IPC::Message& message) { return handled; } -scoped_ptr BrowserDemuxerTizen::CreateDemuxer( +scoped_ptr BrowserDemuxerEfl::CreateDemuxer( int demuxer_client_id) { - return scoped_ptr( + return scoped_ptr( new Internal(this, demuxer_client_id)); } -void BrowserDemuxerTizen::AddDemuxerClient( +void BrowserDemuxerEfl::AddDemuxerClient( int demuxer_client_id, - media::DemuxerTizenClient* client) { + media::DemuxerEflClient* client) { VLOG(1) << __FUNCTION__ << " peer_pid=" << peer_pid() << " demuxer_client_id=" << demuxer_client_id; demuxer_clients_.AddWithID(client, demuxer_client_id); } -void BrowserDemuxerTizen::RemoveDemuxerClient(int demuxer_client_id) { +void BrowserDemuxerEfl::RemoveDemuxerClient(int demuxer_client_id) { VLOG(1) << __FUNCTION__ << " peer_pid=" << peer_pid() << " demuxer_client_id=" << demuxer_client_id; demuxer_clients_.Remove(demuxer_client_id); } -void BrowserDemuxerTizen::OnDemuxerReady( +void BrowserDemuxerEfl::OnDemuxerReady( int demuxer_client_id, const media::DemuxerConfigs& configs) { - media::DemuxerTizenClient* client = + media::DemuxerEflClient* client = demuxer_clients_.Lookup(demuxer_client_id); if (client) client->OnDemuxerConfigsAvailable(configs); } -void BrowserDemuxerTizen::OnReadFromDemuxerAck( +void BrowserDemuxerEfl::OnReadFromDemuxerAck( int demuxer_client_id, base::SharedMemoryHandle foreign_memory_handle, const media::DemuxedBufferMetaData& meta_data) { - media::DemuxerTizenClient* client = + media::DemuxerEflClient* client = demuxer_clients_.Lookup(demuxer_client_id); if (client) client->OnDemuxerDataAvailable(foreign_memory_handle, meta_data); } -void BrowserDemuxerTizen::OnBufferMetaDataAck( +void BrowserDemuxerEfl::OnBufferMetaDataAck( int demuxer_client_id, const media::DemuxedBufferMetaData& meta_data) { - media::DemuxerTizenClient* client = + media::DemuxerEflClient* client = demuxer_clients_.Lookup(demuxer_client_id); if (client) client->OnBufferMetaDataAvailable( meta_data); } -void BrowserDemuxerTizen::OnDemuxerSeekDone( +void BrowserDemuxerEfl::OnDemuxerSeekDone( int demuxer_client_id, const base::TimeDelta& actual_browser_seek_time) { - media::DemuxerTizenClient* client = + media::DemuxerEflClient* client = demuxer_clients_.Lookup(demuxer_client_id); if (client) client->OnDemuxerSeekDone(actual_browser_seek_time); } -void BrowserDemuxerTizen::OnDurationChanged( +void BrowserDemuxerEfl::OnDurationChanged( int demuxer_client_id, const base::TimeDelta& duration) { - media::DemuxerTizenClient* client = + media::DemuxerEflClient* client = demuxer_clients_.Lookup(demuxer_client_id); if (client) client->OnDemuxerDurationChanged(duration); diff --git a/tizen_src/impl/content/browser/media/tizen/browser_demuxer_tizen.h b/tizen_src/chromium_impl/content/browser/media/efl/browser_demuxer_efl.h similarity index 68% rename from tizen_src/impl/content/browser/media/tizen/browser_demuxer_tizen.h rename to tizen_src/chromium_impl/content/browser/media/efl/browser_demuxer_efl.h index 64cdec3..c6e60ff 100644 --- a/tizen_src/impl/content/browser/media/tizen/browser_demuxer_tizen.h +++ b/tizen_src/chromium_impl/content/browser/media/efl/browser_demuxer_efl.h @@ -2,24 +2,24 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_BROWSER_MEDIA_TIZEN_BROWSER_DEMUXER_TIZEN_H_ -#define CONTENT_BROWSER_MEDIA_TIZEN_BROWSER_DEMUXER_TIZEN_H_ +#ifndef CONTENT_BROWSER_MEDIA_TIZEN_BROWSER_DEMUXER_EFL_H_ +#define CONTENT_BROWSER_MEDIA_TIZEN_BROWSER_DEMUXER_EFl_H_ #include "base/id_map.h" #include "base/memory/shared_memory.h" #include "content/public/browser/browser_message_filter.h" -#include "media/base/tizen/demuxer_tizen.h" +#include "media/base/efl/demuxer_efl.h" namespace content { // Represents the browser process half of an IPC-based demuxer proxy. -// It vends out media::DemuxerTizen instances that are registered with an +// It vends out media::DemuxerEfl instances that are registered with an // end point in the renderer process. // -// Refer to RendererDemuxerTizen for the renderer process half. -class CONTENT_EXPORT BrowserDemuxerTizen : public BrowserMessageFilter { +// Refer to RendererDemuxerEfl for the renderer process half. +class CONTENT_EXPORT BrowserDemuxerEfl : public BrowserMessageFilter { public: - BrowserDemuxerTizen(); + BrowserDemuxerEfl(); // BrowserMessageFilter overrides. virtual void OverrideThreadForMessage( @@ -30,11 +30,11 @@ class CONTENT_EXPORT BrowserDemuxerTizen : public BrowserMessageFilter { // Returns an uninitialized demuxer implementation associated with // |demuxer_client_id|, which can be used to communicate with the real demuxer // in the renderer process. - scoped_ptr CreateDemuxer(int demuxer_client_id); + scoped_ptr CreateDemuxer(int demuxer_client_id); protected: - friend class base::RefCountedThreadSafe; - virtual ~BrowserDemuxerTizen(); + friend class base::RefCountedThreadSafe; + virtual ~BrowserDemuxerEfl(); private: class Internal; @@ -43,7 +43,7 @@ class CONTENT_EXPORT BrowserDemuxerTizen : public BrowserMessageFilter { // association. void AddDemuxerClient( int demuxer_client_id, - media::DemuxerTizenClient* client); + media::DemuxerEflClient* client); void RemoveDemuxerClient(int demuxer_client_id); // IPC message handlers. @@ -64,11 +64,11 @@ class CONTENT_EXPORT BrowserDemuxerTizen : public BrowserMessageFilter { int demuxer_client_id, const base::TimeDelta& duration); - IDMap demuxer_clients_; + IDMap demuxer_clients_; - DISALLOW_COPY_AND_ASSIGN(BrowserDemuxerTizen); + DISALLOW_COPY_AND_ASSIGN(BrowserDemuxerEfl); }; } // namespace content -#endif // CONTENT_BROWSER_MEDIA_TIZEN_BROWSER_DEMUXER_TIZEN_H_ +#endif // CONTENT_BROWSER_MEDIA_TIZEN_BROWSER_DEMUXER_EFL_H_ diff --git a/tizen_src/impl/content/browser/media/tizen/browser_media_player_manager_tizen.cc b/tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.cc similarity index 59% rename from tizen_src/impl/content/browser/media/tizen/browser_media_player_manager_tizen.cc rename to tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.cc index 6048ba5..b178e38 100644 --- a/tizen_src/impl/content/browser/media/tizen/browser_media_player_manager_tizen.cc +++ b/tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.cc @@ -2,48 +2,48 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/browser/media/tizen/browser_media_player_manager_tizen.h" +#include "content/browser/media/efl/browser_media_player_manager_efl.h" #include "base/memory/shared_memory.h" -#include "content/browser/media/tizen/browser_demuxer_tizen.h" +#include "content/browser/media/efl/browser_demuxer_efl.h" #include "content/browser/renderer_host/render_process_host_impl.h" -#include "content/common/media/tizen/media_player_messages_tizen.h" +#include "content/common/media/efl/media_player_messages_efl.h" #include "content/public/browser/web_contents.h" #include "ipc/ipc_channel_proxy.h" #include "ipc/ipc_logging.h" -#include "media/base/tizen/media_source_player_gstreamer.h" +#include "media/base/efl/media_source_player_gstreamer.h" #if defined(TIZEN_CAPI_PLAYER_SUPPORT) && defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) #include "media/base/tizen/media_player_bridge_capi.h" #else -#include "media/base/tizen/media_player_bridge_gstreamer.h" +#include "media/base/efl/media_player_bridge_gstreamer.h" #endif namespace content { -BrowserMediaPlayerManagerTizen* BrowserMediaPlayerManagerTizen::Create( +BrowserMediaPlayerManagerEfl* BrowserMediaPlayerManagerEfl::Create( RenderFrameHost* rfh) { - return new BrowserMediaPlayerManagerTizen(rfh); + return new BrowserMediaPlayerManagerEfl(rfh); } -BrowserMediaPlayerManagerTizen::BrowserMediaPlayerManagerTizen( +BrowserMediaPlayerManagerEfl::BrowserMediaPlayerManagerEfl( RenderFrameHost* render_frame_host) : render_frame_host_(render_frame_host), web_contents_(WebContents::FromRenderFrameHost(render_frame_host)), weak_ptr_factory_(this) { } -BrowserMediaPlayerManagerTizen::~BrowserMediaPlayerManagerTizen() { - for (ScopedVector::iterator it = players_.begin(); +BrowserMediaPlayerManagerEfl::~BrowserMediaPlayerManagerEfl() { + for (ScopedVector::iterator it = players_.begin(); it != players_.end(); ++it) { (*it)->Destroy(); } players_.weak_clear(); } -media::MediaPlayerTizen* BrowserMediaPlayerManagerTizen::GetPlayer( +media::MediaPlayerEfl* BrowserMediaPlayerManagerEfl::GetPlayer( int player_id) { - for (ScopedVector::iterator it = players_.begin(); + for (ScopedVector::iterator it = players_.begin(); it != players_.end(); ++it) { if ((*it)->GetPlayerId() == player_id) return *it; @@ -51,7 +51,7 @@ media::MediaPlayerTizen* BrowserMediaPlayerManagerTizen::GetPlayer( return NULL; } -void BrowserMediaPlayerManagerTizen::OnNewFrameAvailable( +void BrowserMediaPlayerManagerEfl::OnNewFrameAvailable( int player_id, base::SharedMemoryHandle foreign_memory_handle, uint32 length, base::TimeDelta timestamp) { @@ -60,7 +60,7 @@ void BrowserMediaPlayerManagerTizen::OnNewFrameAvailable( } #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) -void BrowserMediaPlayerManagerTizen::OnPlatformSurfaceUpdated( +void BrowserMediaPlayerManagerEfl::OnPlatformSurfaceUpdated( int player_id, int pixmap_id, base::TimeDelta timestamp) { @@ -69,25 +69,25 @@ void BrowserMediaPlayerManagerTizen::OnPlatformSurfaceUpdated( } #endif -void BrowserMediaPlayerManagerTizen::OnTimeChanged(int player_id) { +void BrowserMediaPlayerManagerEfl::OnTimeChanged(int player_id) { Send(new MediaPlayerGstMsg_TimeChanged(GetRoutingID(), player_id)); } -void BrowserMediaPlayerManagerTizen::OnPauseStateChange( +void BrowserMediaPlayerManagerEfl::OnPauseStateChange( int player_id, bool state) { Send(new MediaPlayerGstMsg_OnPauseStateChange( GetRoutingID(), player_id, state)); } -void BrowserMediaPlayerManagerTizen::OnSeekStateChange( +void BrowserMediaPlayerManagerEfl::OnSeekStateChange( int player_id, bool state) { Send(new MediaPlayerGstMsg_OnSeekStateChange( GetRoutingID(), player_id, state)); } -void BrowserMediaPlayerManagerTizen::OnRequestSeek( +void BrowserMediaPlayerManagerEfl::OnRequestSeek( int player_id, double seek_time) { // To handle internal seek. @@ -95,42 +95,42 @@ void BrowserMediaPlayerManagerTizen::OnRequestSeek( GetRoutingID(), player_id, seek_time)); } -void BrowserMediaPlayerManagerTizen::OnTimeUpdate( +void BrowserMediaPlayerManagerEfl::OnTimeUpdate( int player_id, double current_time) { Send(new MediaPlayerGstMsg_TimeUpdate( GetRoutingID(), player_id, current_time)); } -void BrowserMediaPlayerManagerTizen::OnBufferUpdate( +void BrowserMediaPlayerManagerEfl::OnBufferUpdate( int player_id, - std::vector buffer_range) { + std::vector buffer_range) { Send(new MediaPlayerGstMsg_BufferUpdate( GetRoutingID(), player_id, buffer_range)); } -void BrowserMediaPlayerManagerTizen::OnDurationChange( +void BrowserMediaPlayerManagerEfl::OnDurationChange( int player_id, double duration) { Send(new MediaPlayerGstMsg_DurationChanged( GetRoutingID(), player_id, duration)); } -void BrowserMediaPlayerManagerTizen::OnReadyStateChange( +void BrowserMediaPlayerManagerEfl::OnReadyStateChange( int player_id, - media::MediaPlayerTizen::ReadyState state) { + media::MediaPlayerEfl::ReadyState state) { Send(new MediaPlayerGstMsg_ReadyStateChange( GetRoutingID(), player_id, state)); } -void BrowserMediaPlayerManagerTizen::OnNetworkStateChange( +void BrowserMediaPlayerManagerEfl::OnNetworkStateChange( int player_id, - media::MediaPlayerTizen::NetworkState state) { + media::MediaPlayerEfl::NetworkState state) { Send(new MediaPlayerGstMsg_NetworkStateChange( GetRoutingID(), player_id, state)); } -void BrowserMediaPlayerManagerTizen::OnMediaDataChange( +void BrowserMediaPlayerManagerEfl::OnMediaDataChange( int player_id, int format, int height, @@ -140,19 +140,19 @@ void BrowserMediaPlayerManagerTizen::OnMediaDataChange( GetRoutingID(), player_id, format, height, width, media)); } -int BrowserMediaPlayerManagerTizen::GetRoutingID() { +int BrowserMediaPlayerManagerEfl::GetRoutingID() { if (!render_frame_host_) return 0; return render_frame_host_->GetRoutingID(); } -bool BrowserMediaPlayerManagerTizen::Send(IPC::Message* msg) { +bool BrowserMediaPlayerManagerEfl::Send(IPC::Message* msg) { if (!render_frame_host_) return false; return render_frame_host_->Send(msg); } -void BrowserMediaPlayerManagerTizen::OnInitialize( +void BrowserMediaPlayerManagerEfl::OnInitialize( int player_id, MediaPlayerHostMsg_Initialize_Type type, const GURL& url, @@ -166,7 +166,7 @@ void BrowserMediaPlayerManagerTizen::OnInitialize( LOG(INFO) << "MediaElement is using |CAPI| to play media"; AddPlayer(new media::MediaPlayerBridgeCapi(player_id, url, volume, this)); #else - LOG(INFO) << "MediaElement is using |Gstreamer| to play media"; + LOG(INFO) << "MediaElement is using |Efl| to play media"; AddPlayer( new media::MediaPlayerBridgeGstreamer(player_id, url, volume, this)); #endif @@ -176,64 +176,64 @@ void BrowserMediaPlayerManagerTizen::OnInitialize( web_contents()->GetRenderProcessHost()); AddPlayer(new media::MediaSourcePlayerGstreamer( player_id, - host->browser_demuxer_tizen()->CreateDemuxer(demuxer_client_id), + host->browser_demuxer_efl()->CreateDemuxer(demuxer_client_id), this)); } else { LOG(ERROR) << __FUNCTION__ << " Load type is wrong!"; } } -void BrowserMediaPlayerManagerTizen::OnDestroy(int player_id) { +void BrowserMediaPlayerManagerEfl::OnDestroy(int player_id) { VLOG(1) << __FUNCTION__ << " " << player_id; RemovePlayer(player_id); } -void BrowserMediaPlayerManagerTizen::OnPlay(int player_id) { - media::MediaPlayerTizen* player = GetPlayer(player_id); +void BrowserMediaPlayerManagerEfl::OnPlay(int player_id) { + media::MediaPlayerEfl* player = GetPlayer(player_id); if (player) player->Play(); } -void BrowserMediaPlayerManagerTizen::OnPause(int player_id) { - media::MediaPlayerTizen* player = GetPlayer(player_id); +void BrowserMediaPlayerManagerEfl::OnPause(int player_id) { + media::MediaPlayerEfl* player = GetPlayer(player_id); if (player) player->Pause(false); } -void BrowserMediaPlayerManagerTizen::OnSetVolume( +void BrowserMediaPlayerManagerEfl::OnSetVolume( int player_id, double volume) { - media::MediaPlayerTizen* player = GetPlayer(player_id); + media::MediaPlayerEfl* player = GetPlayer(player_id); if (player) player->SetVolume(volume); } -void BrowserMediaPlayerManagerTizen::OnSetRate(int player_id, double rate) { - media::MediaPlayerTizen* player = GetPlayer(player_id); +void BrowserMediaPlayerManagerEfl::OnSetRate(int player_id, double rate) { + media::MediaPlayerEfl* player = GetPlayer(player_id); if (player) player->SetRate(rate); } -void BrowserMediaPlayerManagerTizen::OnSeek(int player_id, double time) { - media::MediaPlayerTizen* player = GetPlayer(player_id); +void BrowserMediaPlayerManagerEfl::OnSeek(int player_id, double time) { + media::MediaPlayerEfl* player = GetPlayer(player_id); if (player) player->Seek(time); } -void BrowserMediaPlayerManagerTizen::AddPlayer( - media::MediaPlayerTizen* player) { +void BrowserMediaPlayerManagerEfl::AddPlayer( + media::MediaPlayerEfl* player) { DCHECK(!GetPlayer(player->GetPlayerId())); - VLOG(1) << "BrowserMediaPlayerManagerTizen::" << __FUNCTION__ + VLOG(1) << "BrowserMediaPlayerManagerEfl::" << __FUNCTION__ << " Player-Id : " << player->GetPlayerId(); players_.push_back(player); } -void BrowserMediaPlayerManagerTizen::RemovePlayer(int player_id) { - for (ScopedVector::iterator it = players_.begin(); +void BrowserMediaPlayerManagerEfl::RemovePlayer(int player_id) { + for (ScopedVector::iterator it = players_.begin(); it != players_.end(); ++it) { - media::MediaPlayerTizen* player = *it; + media::MediaPlayerEfl* player = *it; if (player->GetPlayerId() == player_id) { - VLOG(1) << "BrowserMediaPlayerManagerTizen::" << __FUNCTION__ + VLOG(1) << "BrowserMediaPlayerManagerEfl::" << __FUNCTION__ << " Player-Id : " << player->GetPlayerId(); players_.weak_erase(it); player->Destroy(); diff --git a/tizen_src/impl/content/browser/media/tizen/browser_media_player_manager_tizen.h b/tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.h similarity index 73% rename from tizen_src/impl/content/browser/media/tizen/browser_media_player_manager_tizen.h rename to tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.h index 2456cf8..1178b69 100644 --- a/tizen_src/impl/content/browser/media/tizen/browser_media_player_manager_tizen.h +++ b/tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.h @@ -9,24 +9,24 @@ #include "content/public/browser/browser_message_filter.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents_observer.h" -#include "media/base/tizen/media_player_manager_tizen.h" +#include "media/base/efl/media_player_manager_efl.h" namespace content { -// This class manages all the MediaPlayerTizen objects. It receives +// This class manages all the MediaPlayerEfl objects. It receives // control operations from the the render process, and forwards -// them to corresponding MediaPlayerTizen object. Callbacks from -// MediaPlayerTizen objects are converted to IPCs and then sent to the +// them to corresponding MediaPlayerEfl object. Callbacks from +// MediaPlayerEfl objects are converted to IPCs and then sent to the // render process. -class CONTENT_EXPORT BrowserMediaPlayerManagerTizen +class CONTENT_EXPORT BrowserMediaPlayerManagerEfl : public media::MediaPlayerManager { public: // Returns a new instance using the registered factory if available. - static BrowserMediaPlayerManagerTizen* Create( RenderFrameHost* efh); - virtual ~BrowserMediaPlayerManagerTizen(); + static BrowserMediaPlayerManagerEfl* Create( RenderFrameHost* efh); + virtual ~BrowserMediaPlayerManagerEfl(); // media::MediaPlayerManager implementation. - virtual media::MediaPlayerTizen* GetPlayer(int player_id) override; + virtual media::MediaPlayerEfl* GetPlayer(int player_id) override; virtual void OnTimeChanged(int player_id) override; virtual void OnTimeUpdate(int player_id, double current_time) override; virtual void OnPauseStateChange(int player_id, bool state) override; @@ -34,14 +34,14 @@ class CONTENT_EXPORT BrowserMediaPlayerManagerTizen virtual void OnRequestSeek(int player_id, double seek_time) override; virtual void OnBufferUpdate( int player_id, - std::vector buffer_range) override; + std::vector buffer_range) override; virtual void OnDurationChange(int player_id, double duration) override; virtual void OnReadyStateChange( int player_id, - media::MediaPlayerTizen::ReadyState state) override; + media::MediaPlayerEfl::ReadyState state) override; virtual void OnNetworkStateChange( int player_id, - media::MediaPlayerTizen::NetworkState state) override; + media::MediaPlayerEfl::NetworkState state) override; virtual void OnMediaDataChange( int player_id, int format, @@ -60,7 +60,7 @@ class CONTENT_EXPORT BrowserMediaPlayerManagerTizen base::TimeDelta timestamp) override; #endif - // Helper function to handle IPC from RenderMediaPlayerMangaerTizen. + // Helper function to handle IPC from RenderMediaPlayerMangaerEfl. virtual void OnPlay(int player_id); virtual void OnPause(int player_id); virtual void OnSetVolume(int player_id, double volume); @@ -76,9 +76,9 @@ class CONTENT_EXPORT BrowserMediaPlayerManagerTizen protected: // Clients must use Create() or subclass constructor. - explicit BrowserMediaPlayerManagerTizen(RenderFrameHost* render_frame_host); + explicit BrowserMediaPlayerManagerEfl(RenderFrameHost* render_frame_host); - void AddPlayer(media::MediaPlayerTizen* player); + void AddPlayer(media::MediaPlayerEfl* player); void RemovePlayer(int player_id); // Helper function to send messages to RenderFrameObserver. @@ -89,12 +89,12 @@ class CONTENT_EXPORT BrowserMediaPlayerManagerTizen private: // An array of managed players. - ScopedVector players_; + ScopedVector players_; RenderFrameHost* render_frame_host_; WebContents* const web_contents_; - base::WeakPtrFactory weak_ptr_factory_; + base::WeakPtrFactory weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManagerTizen); + DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManagerEfl); }; } // namespace content diff --git a/tizen_src/impl/content/browser/media/tizen/webaudio_decoder_browser_gstreamer.cc b/tizen_src/chromium_impl/content/browser/media/efl/webaudio_decoder_browser_gstreamer.cc similarity index 95% rename from tizen_src/impl/content/browser/media/tizen/webaudio_decoder_browser_gstreamer.cc rename to tizen_src/chromium_impl/content/browser/media/efl/webaudio_decoder_browser_gstreamer.cc index 5bb192c..1d0a6e0 100644 --- a/tizen_src/impl/content/browser/media/tizen/webaudio_decoder_browser_gstreamer.cc +++ b/tizen_src/chromium_impl/content/browser/media/efl/webaudio_decoder_browser_gstreamer.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/browser/media/tizen/webaudio_decoder_browser_gstreamer.h" +#include "content/browser/media/efl/webaudio_decoder_browser_gstreamer.h" #include "base/bind.h" #include "base/strings/string_util.h" @@ -11,7 +11,7 @@ #include "gst/audio/audio.h" #include "media/base/audio_bus.h" #include "media/base/limits.h" -#include "media/base/tizen/webaudio_media_codec_info_tizen.h" +#include "media/base/efl/webaudio_media_codec_info_efl.h" #include "third_party/WebKit/public/platform/WebAudioBus.h" namespace content { @@ -51,7 +51,7 @@ void GSTDecoder::InitializeGstDestination(int pcm_output, uint16_t number_of_channels, uint32_t sample_rate, size_t number_of_frames) { - struct media::WebAudioMediaCodecInfoTizen info = { + struct media::WebAudioMediaCodecInfoEfl info = { static_cast(number_of_channels), static_cast(sample_rate), static_cast(number_of_frames) @@ -331,6 +331,8 @@ GstFlowReturn GSTDecoder::cb_new_buffer (GstAppSink* sink, gpointer user_data) { ret &= gst_structure_get_int(str, "rate", &rate); #if !(GST_VERSION_MAJOR == 1) ret &= gst_structure_get_int(str, "width", &width); +#else + (void)width; #endif } @@ -406,21 +408,21 @@ GstBusSyncReply GSTDecoder::cb_pipeline_message(GstBus* bus, } //////////////////////////////////////// -// BrowserMessageFilterTizen class +// BrowserMessageFilterEfl class // static -BrowserMessageFilterTizen* BrowserMessageFilterTizen::GetInstance() { - return Singleton::get(); +BrowserMessageFilterEfl* BrowserMessageFilterEfl::GetInstance() { + return Singleton::get(); } -BrowserMessageFilterTizen::BrowserMessageFilterTizen() +BrowserMessageFilterEfl::BrowserMessageFilterEfl() : gst_thread_("GstThread") { } -BrowserMessageFilterTizen::~BrowserMessageFilterTizen() { +BrowserMessageFilterEfl::~BrowserMessageFilterEfl() { } -void BrowserMessageFilterTizen::DecodeUsingGST( +void BrowserMessageFilterEfl::DecodeUsingGST( base::SharedMemoryHandle foreign_memory_handle, base::FileDescriptor pcm_output, uint32_t data_size) { @@ -436,7 +438,7 @@ void BrowserMessageFilterTizen::DecodeUsingGST( data->encodeddata_ = (uint8_t*) (malloc(data_size)); if (!data->encodeddata_) { - LOG(ERROR) << "BrowserMessageFilterTizen::"<<__FUNCTION__ + LOG(ERROR) << "BrowserMessageFilterEfl::"<<__FUNCTION__ << " - encodeddata malloc failed"; delete data; return; @@ -463,19 +465,19 @@ void BrowserMessageFilterTizen::DecodeUsingGST( delete data; } -void BrowserMessageFilterTizen::EncodedDataReceived( +void BrowserMessageFilterEfl::EncodedDataReceived( base::SharedMemoryHandle foreign_memory_handle, base::FileDescriptor pcm_output, uint32_t data_size) { if (!gst_thread_.IsRunning() && !gst_thread_.Start()) { - LOG(ERROR) << "BrowserMessageFilterTizen::"<<__FUNCTION__ + LOG(ERROR) << "BrowserMessageFilterEfl::"<<__FUNCTION__ << " - Starting GStreamer thread failed"; return; } gst_thread_.message_loop()->PostTask(FROM_HERE, - base::Bind(&BrowserMessageFilterTizen::DecodeUsingGST, + base::Bind(&BrowserMessageFilterEfl::DecodeUsingGST, base::Unretained(this), foreign_memory_handle, pcm_output, data_size)); } diff --git a/tizen_src/impl/content/browser/media/tizen/webaudio_decoder_browser_gstreamer.h b/tizen_src/chromium_impl/content/browser/media/efl/webaudio_decoder_browser_gstreamer.h similarity index 83% rename from tizen_src/impl/content/browser/media/tizen/webaudio_decoder_browser_gstreamer.h rename to tizen_src/chromium_impl/content/browser/media/efl/webaudio_decoder_browser_gstreamer.h index 22d29e8..019a0c6 100644 --- a/tizen_src/impl/content/browser/media/tizen/webaudio_decoder_browser_gstreamer.h +++ b/tizen_src/chromium_impl/content/browser/media/efl/webaudio_decoder_browser_gstreamer.h @@ -43,26 +43,26 @@ typedef struct _GstAppData { GSTDecoder *gst_decoder_; } GstAppData; -// BrowserMessageFilterTizen class -class CONTENT_EXPORT BrowserMessageFilterTizen { +// BrowserMessageFilterEfl class +class CONTENT_EXPORT BrowserMessageFilterEfl { public: - static BrowserMessageFilterTizen* GetInstance(); + static BrowserMessageFilterEfl* GetInstance(); void EncodedDataReceived(base::SharedMemoryHandle foreign_memory_handle, base::FileDescriptor pcm_output, uint32_t data_size); private: - friend struct DefaultSingletonTraits; - BrowserMessageFilterTizen(); - virtual ~BrowserMessageFilterTizen(); + friend struct DefaultSingletonTraits; + BrowserMessageFilterEfl(); + virtual ~BrowserMessageFilterEfl(); void DecodeUsingGST(base::SharedMemoryHandle foreign_memory_handle, base::FileDescriptor pcm_output, uint32_t data_size); base::Thread gst_thread_; - DISALLOW_COPY_AND_ASSIGN(BrowserMessageFilterTizen); + DISALLOW_COPY_AND_ASSIGN(BrowserMessageFilterEfl); }; } // namespace content diff --git a/tizen_src/impl/content/browser/media/media_web_contents_observer_tizen.cc b/tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.cc similarity index 63% rename from tizen_src/impl/content/browser/media/media_web_contents_observer_tizen.cc rename to tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.cc index dbc5fdb..75b0750 100644 --- a/tizen_src/impl/content/browser/media/media_web_contents_observer_tizen.cc +++ b/tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.cc @@ -2,70 +2,70 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/browser/media/media_web_contents_observer_tizen.h" +#include "content/browser/media/media_web_contents_observer_efl.h" -#include "content/browser/media/tizen/browser_media_player_manager_tizen.h" +#include "content/browser/media/efl/browser_media_player_manager_efl.h" #include "content/browser/renderer_host/render_process_host_impl.h" -#include "content/common/media/tizen/media_player_messages_tizen.h" +#include "content/common/media/efl/media_player_messages_efl.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "ipc/ipc_message_macros.h" namespace content { -MediaWebContentsObserverTizen::MediaWebContentsObserverTizen( +MediaWebContentsObserverEfl::MediaWebContentsObserverEfl( RenderViewHost* render_view_host) : WebContentsObserver(WebContents::FromRenderViewHost(render_view_host)) { } -MediaWebContentsObserverTizen::~MediaWebContentsObserverTizen() { +MediaWebContentsObserverEfl::~MediaWebContentsObserverEfl() { } -void MediaWebContentsObserverTizen::RenderFrameDeleted( +void MediaWebContentsObserverEfl::RenderFrameDeleted( RenderFrameHost* render_frame_host) { uintptr_t key = reinterpret_cast(render_frame_host); media_player_managers_.erase(key); } -bool MediaWebContentsObserverTizen::OnMessageReceived(const IPC::Message& msg, +bool MediaWebContentsObserverEfl::OnMessageReceived(const IPC::Message& msg, RenderFrameHost* render_frame_host) { return OnMediaPlayerMessageReceived(msg, render_frame_host); } -bool MediaWebContentsObserverTizen::OnMediaPlayerMessageReceived( +bool MediaWebContentsObserverEfl::OnMediaPlayerMessageReceived( const IPC::Message& msg, RenderFrameHost* render_frame_host) { bool handled = true; - IPC_BEGIN_MESSAGE_MAP(MediaWebContentsObserverTizen, msg) + IPC_BEGIN_MESSAGE_MAP(MediaWebContentsObserverEfl, msg) IPC_MESSAGE_FORWARD(MediaPlayerGstHostMsg_Init, GetMediaPlayerManager(render_frame_host), - BrowserMediaPlayerManagerTizen::OnInitialize) + BrowserMediaPlayerManagerEfl::OnInitialize) IPC_MESSAGE_FORWARD(MediaPlayerGstHostMsg_DeInit, GetMediaPlayerManager(render_frame_host), - BrowserMediaPlayerManagerTizen::OnDestroy) + BrowserMediaPlayerManagerEfl::OnDestroy) IPC_MESSAGE_FORWARD(MediaPlayerGstHostMsg_Play, GetMediaPlayerManager(render_frame_host), - BrowserMediaPlayerManagerTizen::OnPlay) + BrowserMediaPlayerManagerEfl::OnPlay) IPC_MESSAGE_FORWARD(MediaPlayerGstHostMsg_Pause, GetMediaPlayerManager(render_frame_host), - BrowserMediaPlayerManagerTizen::OnPause) + BrowserMediaPlayerManagerEfl::OnPause) IPC_MESSAGE_FORWARD(MediaPlayerGstHostMsg_SetVolume, GetMediaPlayerManager(render_frame_host), - BrowserMediaPlayerManagerTizen::OnSetVolume) + BrowserMediaPlayerManagerEfl::OnSetVolume) IPC_MESSAGE_FORWARD(MediaPlayerGstHostMsg_SetRate, GetMediaPlayerManager(render_frame_host), - BrowserMediaPlayerManagerTizen::OnSetRate) + BrowserMediaPlayerManagerEfl::OnSetRate) IPC_MESSAGE_FORWARD(MediaPlayerGstHostMsg_Seek, GetMediaPlayerManager(render_frame_host), - BrowserMediaPlayerManagerTizen::OnSeek) + BrowserMediaPlayerManagerEfl::OnSeek) IPC_MESSAGE_UNHANDLED(handled = false) @@ -73,15 +73,15 @@ bool MediaWebContentsObserverTizen::OnMediaPlayerMessageReceived( return handled; } -BrowserMediaPlayerManagerTizen* - MediaWebContentsObserverTizen::GetMediaPlayerManager( +BrowserMediaPlayerManagerEfl* + MediaWebContentsObserverEfl::GetMediaPlayerManager( RenderFrameHost* render_frame_host) { uintptr_t key = reinterpret_cast(render_frame_host); if (!media_player_managers_.contains(key)) { media_player_managers_.set( key, make_scoped_ptr( - BrowserMediaPlayerManagerTizen::Create(render_frame_host))); + BrowserMediaPlayerManagerEfl::Create(render_frame_host))); } return media_player_managers_.get(key); } diff --git a/tizen_src/impl/content/browser/media/media_web_contents_observer_tizen.h b/tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.h similarity index 73% rename from tizen_src/impl/content/browser/media/media_web_contents_observer_tizen.h rename to tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.h index 928b39a..909a767 100644 --- a/tizen_src/impl/content/browser/media/media_web_contents_observer_tizen.h +++ b/tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_TIZEN_H_ -#define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_TIZEN_H_ +#ifndef CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_EFL_H_ +#define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_EFL_H_ #include "base/compiler_specific.h" #include "base/containers/scoped_ptr_hash_map.h" @@ -12,18 +12,18 @@ namespace content { -class BrowserMediaPlayerManagerTizen; +class BrowserMediaPlayerManagerEfl; class RenderViewHost; // This class manages all RenderFrame based media related managers at the // browser side. It receives IPC messages from media RenderFrameObservers and // forwards them to the corresponding managers. The managers are responsible // for sending IPCs back to the RenderFrameObservers at the render side. -class CONTENT_EXPORT MediaWebContentsObserverTizen +class CONTENT_EXPORT MediaWebContentsObserverEfl : public WebContentsObserver { public: - explicit MediaWebContentsObserverTizen(RenderViewHost* render_view_host); - virtual ~MediaWebContentsObserverTizen(); + explicit MediaWebContentsObserverEfl(RenderViewHost* render_view_host); + virtual ~MediaWebContentsObserverEfl(); // WebContentsObserver implementations. virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; @@ -37,18 +37,18 @@ class CONTENT_EXPORT MediaWebContentsObserverTizen // Gets the media player manager associated with |render_frame_host|. Creates // a new one if it doesn't exist. The caller doesn't own the returned pointer. - BrowserMediaPlayerManagerTizen* GetMediaPlayerManager( + BrowserMediaPlayerManagerEfl* GetMediaPlayerManager( RenderFrameHost* render_frame_host); private: - // Map from RenderFrameHost* to BrowserMediaPlayerManagerTizen. - typedef base::ScopedPtrHashMap + // Map from RenderFrameHost* to BrowserMediaPlayerManagerEfl. + typedef base::ScopedPtrHashMap MediaPlayerManagerMap; MediaPlayerManagerMap media_player_managers_; - DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverTizen); + DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverEfl); }; } // namespace content -#endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_TIZEN_H_ +#endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_EFL_H_ diff --git a/tizen_src/impl/cache_params_efl.h b/tizen_src/chromium_impl/content/common/cache_params_efl.h similarity index 100% rename from tizen_src/impl/cache_params_efl.h rename to tizen_src/chromium_impl/content/common/cache_params_efl.h diff --git a/tizen_src/impl/content/common/gpu/media/tizen/tizen_video_decode_accelerator.cc b/tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.cc similarity index 98% rename from tizen_src/impl/content/common/gpu/media/tizen/tizen_video_decode_accelerator.cc rename to tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.cc index d79e7e6..a7b7ce5 100644 --- a/tizen_src/impl/content/common/gpu/media/tizen/tizen_video_decode_accelerator.cc +++ b/tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/common/gpu/media/tizen/tizen_video_decode_accelerator.h" +#include "content/common/gpu/media/efl/tizen_video_decode_accelerator.h" #include #include @@ -39,17 +39,21 @@ struct GstElementDeleter { }; // Gstreamer elements and names. +#if defined(OS_TIZEN) const char* kDecoderName = "decoder"; #if GST_VERSION_MAJOR == 1 const char* kDecoderGstElement = "omxh264dec"; #else const char* kDecoderGstElement = "omx_h264dec"; #endif +#endif // OS_TIZEN // Generating Unique Key from given width and height. +#if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) int32 ConvertWidthAndHeightToKey(int width, int height) { return ((width << 16) | height); } +#endif // TIZEN_MULTIMEDIA_PIXMAP_SUPPORT } // namespace namespace content { @@ -113,8 +117,8 @@ struct TizenVideoDecodeAccelerator::Impl { sink_(NULL), appsrc_(NULL), io_message_loop_proxy_(base::MessageLoopProxy::current()), - bitstream_buffer_id_(0), - gst_thread_("TizenDecoderThreadGst") + gst_thread_("TizenDecoderThreadGst"), + bitstream_buffer_id_(0) #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) ,pixmap_id_(0), gst_width_(0), @@ -251,13 +255,15 @@ bool TizenVideoDecodeAccelerator::Initialize( GError* error = NULL; GstCaps* video_caps = NULL; GstElement* gst_decoder = NULL; - GstElement* gst_parser = NULL; GstBus* gst_bus = NULL; +#if defined(OS_TIZEN) GstPad* video_sink_pad = NULL; + GstElement* gst_parser = NULL; #if !defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) GstElement* video_filter_ = NULL; GstElement* gst_converter = NULL; #endif +#endif scoped_ptr gst_pipeline; static GstAppSrcCallbacks appsrc_callbacks = {&Impl::StartFeed, &Impl::StopFeed, NULL}; @@ -692,7 +698,7 @@ GstFlowReturn TizenVideoDecodeAccelerator::Impl::OnDecoded( void TizenVideoDecodeAccelerator::Impl::CreateAppSinkElement() { GstAppSinkCallbacks appsink_callbacks = - {NULL, NULL, &OnDecoded, NULL}; + { NULL, NULL, &OnDecoded }; if (!(sink_ = gst_element_factory_make("appsink", "sink"))) { LOG(ERROR) << __FUNCTION__ << "Appsink could not be created"; @@ -916,7 +922,7 @@ void TizenVideoDecodeAccelerator::OnDecode( } // lifecycle of buffer_ref will be handled by gstreamer. - buffer_ref.release(); + (void)buffer_ref.release(); } void TizenVideoDecodeAccelerator::NotifyError( diff --git a/tizen_src/impl/content/common/gpu/media/tizen/tizen_video_decode_accelerator.h b/tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.h similarity index 100% rename from tizen_src/impl/content/common/gpu/media/tizen/tizen_video_decode_accelerator.h rename to tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.h diff --git a/tizen_src/impl/content/common/gpu/media/tizen/tizen_video_encode_accelerator.cc b/tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.cc similarity index 99% rename from tizen_src/impl/content/common/gpu/media/tizen/tizen_video_encode_accelerator.cc rename to tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.cc index 2db7941..cd76329 100644 --- a/tizen_src/impl/content/common/gpu/media/tizen/tizen_video_encode_accelerator.cc +++ b/tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/common/gpu/media/tizen/tizen_video_encode_accelerator.h" +#include "content/common/gpu/media/efl/tizen_video_encode_accelerator.h" #include #include @@ -518,7 +518,6 @@ bool TizenVideoEncodeAccelerator::StartEncoder() { GError* error = NULL; GstCaps* appsrc_caps = NULL; GstElement* gst_appsink = NULL; - gboolean retval = FALSE; scoped_ptr gst_pipeline; guint64 max_input_buffer = @@ -529,7 +528,7 @@ bool TizenVideoEncodeAccelerator::StartEncoder() { &TizenVideoEncodeAccelerator::Impl::StopFeed, NULL }; GstAppSinkCallbacks appsink_callbacks = - { NULL, NULL, &TizenVideoEncodeAccelerator::Impl::OnEncoded, NULL }; + { NULL, NULL, &TizenVideoEncodeAccelerator::Impl::OnEncoded }; if (impl_->pipeline_ != NULL) { return false; diff --git a/tizen_src/impl/content/common/gpu/media/tizen/tizen_video_encode_accelerator.h b/tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.h similarity index 100% rename from tizen_src/impl/content/common/gpu/media/tizen/tizen_video_encode_accelerator.h rename to tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.h diff --git a/tizen_src/impl/content/common/media/tizen/media_player_messages_tizen.h b/tizen_src/chromium_impl/content/common/media/efl/media_player_messages_efl.h similarity index 92% rename from tizen_src/impl/content/common/media/tizen/media_player_messages_tizen.h rename to tizen_src/chromium_impl/content/common/media/efl/media_player_messages_efl.h index 3e7fa97..02fc757 100644 --- a/tizen_src/impl/content/common/media/tizen/media_player_messages_tizen.h +++ b/tizen_src/chromium_impl/content/common/media/efl/media_player_messages_efl.h @@ -8,17 +8,17 @@ #include "content/common/content_export.h" #include "ipc/ipc_message_macros.h" #include "media/base/media_keys.h" -#include "media/base/tizen/demuxer_stream_player_params_tizen.h" -#include "media/base/tizen/media_player_manager_tizen.h" +#include "media/base/efl/demuxer_stream_player_params_efl.h" +#include "media/base/efl/media_player_manager_efl.h" #include "ui/gfx/rect_f.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT -#define IPC_MESSAGE_START MediaPlayerTizenMsgStart +#define IPC_MESSAGE_START MediaPlayerEflMsgStart IPC_ENUM_TRAITS(media::AudioCodec) -IPC_ENUM_TRAITS(media::MediaPlayerTizen::ReadyState) -IPC_ENUM_TRAITS(media::MediaPlayerTizen::NetworkState) +IPC_ENUM_TRAITS(media::MediaPlayerEfl::ReadyState) +IPC_ENUM_TRAITS(media::MediaPlayerEfl::NetworkState) IPC_ENUM_TRAITS(media::DemuxerStream::Status) IPC_ENUM_TRAITS(media::DemuxerStream::Type) IPC_ENUM_TRAITS(media::VideoCodec) @@ -53,7 +53,7 @@ IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(media::MediaPlayerTizen::TimeRanges) +IPC_STRUCT_TRAITS_BEGIN(media::MediaPlayerEfl::TimeRanges) IPC_STRUCT_TRAITS_MEMBER(start) IPC_STRUCT_TRAITS_MEMBER(end) IPC_STRUCT_TRAITS_END() @@ -111,7 +111,7 @@ IPC_MESSAGE_ROUTED2(MediaPlayerGstMsg_OnSeekStateChange, // Current buffer range. IPC_MESSAGE_ROUTED2(MediaPlayerGstMsg_BufferUpdate, int /* player_id */, - std::vector /*buffer_range*/) + std::vector /*buffer_range*/) // Playback completed. IPC_MESSAGE_ROUTED1(MediaPlayerGstMsg_TimeChanged, @@ -120,12 +120,12 @@ IPC_MESSAGE_ROUTED1(MediaPlayerGstMsg_TimeChanged, // Ready state change. IPC_MESSAGE_ROUTED2(MediaPlayerGstMsg_ReadyStateChange, int /* player_id */, - media::MediaPlayerTizen::ReadyState /* state */) + media::MediaPlayerEfl::ReadyState /* state */) // Network state change. IPC_MESSAGE_ROUTED2(MediaPlayerGstMsg_NetworkStateChange, int /* player_id */, - media::MediaPlayerTizen::NetworkState /* state */) + media::MediaPlayerEfl::NetworkState /* state */) // Gst media data has changed. IPC_MESSAGE_ROUTED5(MediaPlayerGstMsg_MediaDataChanged, diff --git a/tizen_src/impl/content/common/media/tizen/media_player_messages_enums_tizen.h b/tizen_src/chromium_impl/content/common/media/efl/media_player_messages_enums_efl.h similarity index 62% rename from tizen_src/impl/content/common/media/tizen/media_player_messages_enums_tizen.h rename to tizen_src/chromium_impl/content/common/media/efl/media_player_messages_enums_efl.h index c6f9f8f..efb7701 100644 --- a/tizen_src/impl/content/common/media/tizen/media_player_messages_enums_tizen.h +++ b/tizen_src/chromium_impl/content/common/media/efl/media_player_messages_enums_efl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_TIZEN_H_ -#define CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_TIZEN_H_ +#ifndef CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_EFL_H_ +#define CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_EFL_H_ // Dictates which type of media playback is being initialized. enum MediaPlayerHostMsg_Initialize_Type { @@ -11,4 +11,4 @@ enum MediaPlayerHostMsg_Initialize_Type { MEDIA_PLAYER_TYPE_MEDIA_SOURCE, }; -#endif // CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_TIZEN_H_ +#endif // CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_EFL_H_ diff --git a/tizen_src/impl/common/message_generator_efl.cc b/tizen_src/chromium_impl/content/common/message_generator_efl.cc similarity index 70% rename from tizen_src/impl/common/message_generator_efl.cc rename to tizen_src/chromium_impl/content/common/message_generator_efl.cc index b30c518..570a9fb 100644 --- a/tizen_src/impl/common/message_generator_efl.cc +++ b/tizen_src/chromium_impl/content/common/message_generator_efl.cc @@ -4,30 +4,30 @@ // Get basic type definitions. #define IPC_MESSAGE_IMPL -#include "common/message_generator_efl.h" +#include "content/common/message_generator_efl.h" // Generate constructors. #include "ipc/struct_constructor_macros.h" -#include "common/message_generator_efl.h" +#include "content/common/message_generator_efl.h" // Generate destructors. #include "ipc/struct_destructor_macros.h" -#include "common/message_generator_efl.h" +#include "content/common/message_generator_efl.h" // Generate param traits write methods. #include "ipc/param_traits_write_macros.h" namespace IPC { -#include "common/message_generator_efl.h" +#include "content/common/message_generator_efl.h" } // namespace IPC // Generate param traits read methods. #include "ipc/param_traits_read_macros.h" namespace IPC { -#include "common/message_generator_efl.h" +#include "content/common/message_generator_efl.h" } // namespace IPC // Generate param traits log methods. #include "ipc/param_traits_log_macros.h" namespace IPC { -#include "common/message_generator_efl.h" +#include "content/common/message_generator_efl.h" } // namespace IPC diff --git a/tizen_src/impl/common/message_generator_efl.h b/tizen_src/chromium_impl/content/common/message_generator_efl.h old mode 100755 new mode 100644 similarity index 73% rename from tizen_src/impl/common/message_generator_efl.h rename to tizen_src/chromium_impl/content/common/message_generator_efl.h index abf206e..3a03df0 --- a/tizen_src/impl/common/message_generator_efl.h +++ b/tizen_src/chromium_impl/content/common/message_generator_efl.h @@ -5,8 +5,10 @@ // Multiply-included file, hence no include guard. // efl message generator -#include "common/render_messages_efl.h" +#include "content/common/render_messages_efl.h" +#if !defined(EWK_BRINGUP) #include "components/editing/content/common/editing_messages.h" +#endif #if defined(OS_TIZEN_MOBILE) -#include "common/tts_messages_efl.h" +#include "content/common/tts_messages_efl.h" #endif diff --git a/tizen_src/chromium_impl/content/common/navigation_policy_params.cc b/tizen_src/chromium_impl/content/common/navigation_policy_params.cc new file mode 100644 index 0000000..461cc24 --- /dev/null +++ b/tizen_src/chromium_impl/content/common/navigation_policy_params.cc @@ -0,0 +1,23 @@ +// Copyright 2014 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/common/navigation_policy_params.h" + +#include "third_party/WebKit/public/web/WebNavigationPolicy.h" + +namespace content { + +NavigationPolicyParams::NavigationPolicyParams() + : render_view_id(-1) + , policy(blink::WebNavigationPolicyIgnore) + , type(blink::WebNavigationTypeOther) + , should_replace_current_entry(false) + , is_main_frame(false) + , is_redirect(false) { +} + +NavigationPolicyParams::~NavigationPolicyParams() { +} + +} // namespace content diff --git a/tizen_src/impl/navigation_policy_params.h b/tizen_src/chromium_impl/content/common/navigation_policy_params.h similarity index 89% rename from tizen_src/impl/navigation_policy_params.h rename to tizen_src/chromium_impl/content/common/navigation_policy_params.h index d35be98..97aecc9 100644 --- a/tizen_src/impl/navigation_policy_params.h +++ b/tizen_src/chromium_impl/content/common/navigation_policy_params.h @@ -11,7 +11,12 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "url/gurl.h" +namespace content { + struct NavigationPolicyParams { + NavigationPolicyParams(); + ~NavigationPolicyParams(); + int render_view_id; GURL url; std::string httpMethod; @@ -25,4 +30,6 @@ struct NavigationPolicyParams { bool is_redirect; }; +} // namespace content + #endif /* POLICY_NAVIGATION_PARAMS_H_ */ diff --git a/tizen_src/impl/common/render_messages_efl.h b/tizen_src/chromium_impl/content/common/render_messages_efl.h similarity index 92% rename from tizen_src/impl/common/render_messages_efl.h rename to tizen_src/chromium_impl/content/common/render_messages_efl.h index f30b4a3..0de8633 100644 --- a/tizen_src/impl/common/render_messages_efl.h +++ b/tizen_src/chromium_impl/content/common/render_messages_efl.h @@ -7,25 +7,29 @@ #include "base/values.h" #include "ipc/ipc_message_macros.h" #include "ipc/ipc_channel_handle.h" +#include "content/common/cache_params_efl.h" +#include "content/common/navigation_policy_params.h" #include "content/public/common/common_param_traits.h" #include "content/public/common/referrer.h" +#include "content/renderer/print_pages_params.h" #include "ui/gfx/ipc/gfx_param_traits.h" +#if !defined(EWK_BRINGUP) #include "API/ewk_hit_test_private.h" #include "API/ewk_text_style_private.h" -#include "cache_params_efl.h" -#include "navigation_policy_params.h" -#include "renderer/print_pages_params.h" +#endif // !EWK_BRINGUP #include "third_party/WebKit/public/web/WebNavigationPolicy.h" #include "third_party/WebKit/public/web/WebNavigationType.h" #include "third_party/WebKit/public/web/WebViewModeEnums.h" #include "ui/gfx/ipc/gfx_param_traits.h" #include "url/gurl.h" +#if !defined(EWK_BRINGUP) #include "tizen_webview/public/tw_content_security_policy.h" #include "tizen_webview/public/tw_error.h" #include "tizen_webview/public/tw_hit_test.h" #include "tizen_webview/public/tw_settings.h" #include "tizen_webview/public/tw_wrt.h" +#endif // !EWK_BRINGUP #include #include @@ -53,12 +57,14 @@ IPC_STRUCT_TRAITS_BEGIN(CacheParamsEfl) IPC_STRUCT_TRAITS_MEMBER(cache_max_dead_capacity) IPC_STRUCT_TRAITS_END() +#if !defined(EWK_BRINGUP) IPC_ENUM_TRAITS(tizen_webview::ContentSecurityPolicyType) +#endif IPC_ENUM_TRAITS(blink::WebNavigationPolicy) IPC_ENUM_TRAITS(blink::WebNavigationType) -IPC_STRUCT_TRAITS_BEGIN(NavigationPolicyParams) +IPC_STRUCT_TRAITS_BEGIN(content::NavigationPolicyParams) IPC_STRUCT_TRAITS_MEMBER(render_view_id) IPC_STRUCT_TRAITS_MEMBER(cookie) IPC_STRUCT_TRAITS_MEMBER(url) @@ -71,6 +77,7 @@ IPC_STRUCT_TRAITS_BEGIN(NavigationPolicyParams) IPC_STRUCT_TRAITS_MEMBER(is_redirect) IPC_STRUCT_TRAITS_END() +#if !defined(EWK_BRINGUP) IPC_STRUCT_TRAITS_BEGIN(SelectionColor) IPC_STRUCT_TRAITS_MEMBER(r) IPC_STRUCT_TRAITS_MEMBER(g) @@ -122,23 +129,27 @@ IPC_STRUCT_TRAITS_BEGIN(_Ewk_Hit_Test) IPC_STRUCT_TRAITS_MEMBER(imageData) #endif IPC_STRUCT_TRAITS_END() +#endif -IPC_STRUCT_TRAITS_BEGIN(DidPrintPagesParams) +IPC_STRUCT_TRAITS_BEGIN(content::DidPrintPagesParams) IPC_STRUCT_TRAITS_MEMBER(metafile_data_handle) IPC_STRUCT_TRAITS_MEMBER(data_size) IPC_STRUCT_TRAITS_MEMBER(document_cookie) IPC_STRUCT_TRAITS_MEMBER(filename) IPC_STRUCT_TRAITS_END() +#if !defined(EWK_BRINGUP) IPC_STRUCT_TRAITS_BEGIN(tizen_webview::WrtIpcMessageData) IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_MEMBER(value) IPC_STRUCT_TRAITS_MEMBER(id) IPC_STRUCT_TRAITS_MEMBER(reference_id) IPC_STRUCT_TRAITS_END() +#endif IPC_ENUM_TRAITS(blink::WebViewMode) +#if !defined(EWK_BRINGUP) IPC_STRUCT_TRAITS_BEGIN(tizen_webview::Settings) IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows) IPC_STRUCT_TRAITS_END() @@ -150,7 +161,7 @@ IPC_STRUCT_TRAITS_BEGIN(tizen_webview::Error) IPC_STRUCT_TRAITS_MEMBER(description) IPC_STRUCT_TRAITS_MEMBER(domain) IPC_STRUCT_TRAITS_END() - +#endif // Tells the renderer to clear the cache. IPC_MESSAGE_CONTROL0(EflViewMsg_ClearCache) @@ -181,49 +192,58 @@ IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrlResponse, int, // result: request_id GURL) // result: url +#if !defined(EWK_BRINGUP) IPC_MESSAGE_CONTROL1(WrtMsg_SendWrtMessage, tizen_webview::WrtIpcMessageData /* data */); +#endif IPC_MESSAGE_ROUTED0(EwkViewMsg_GetSelectionStyle) +#if !defined(EWK_BRINGUP) IPC_MESSAGE_ROUTED2(EwkViewMsg_SetCSP, std::string, /* policy */ tizen_webview::ContentSecurityPolicyType /* header type */) +#endif IPC_MESSAGE_ROUTED2(EwkViewMsg_SetScroll, int, /* horizontal position */ int /* vertical position */) +#if !defined(EWK_BRINGUP) IPC_MESSAGE_ROUTED3(EwkViewMsg_DoHitTest, int, /* horizontal position */ int, /* vertical position */ tizen_webview::Hit_Test_Mode /* mode */) -IPC_MESSAGE_ROUTED1(EwkViewMsg_DidFailLoadWithError, - tizen_webview::Error /* error */) - IPC_MESSAGE_ROUTED4(EwkViewMsg_DoHitTestAsync, int, /* horizontal position */ int, /* vertical position */ tizen_webview::Hit_Test_Mode, /* mode */ int64_t /* request id */) +IPC_MESSAGE_ROUTED1(EwkViewMsg_DidFailLoadWithError, + tizen_webview::Error /* error */) +#endif + IPC_MESSAGE_ROUTED3(EwkViewMsg_PrintToPdf, int, /* width */ int, /* height */ base::FilePath /* file name to save pdf*/) +#if !defined(EWK_BRINGUP) IPC_MESSAGE_ROUTED1(EflViewMsg_UpdateSettings, tizen_webview::Settings) +#endif // from renderer to browser IPC_MESSAGE_ROUTED1(EwkHostMsg_DidPrintPagesToPdf, - DidPrintPagesParams /* pdf document parameters */) + content::DidPrintPagesParams /* pdf document parameters */) IPC_SYNC_MESSAGE_CONTROL1_1(EwkHostMsg_DecideNavigationPolicy, - NavigationPolicyParams, + content::NavigationPolicyParams, bool /*handled*/) +#if !defined(EWK_BRINGUP) IPC_SYNC_MESSAGE_ROUTED0_2(EwkHostMsg_GetContentSecurityPolicy, std::string, /* policy */ tizen_webview::ContentSecurityPolicyType /* header type */) @@ -231,6 +251,7 @@ IPC_SYNC_MESSAGE_ROUTED0_2(EwkHostMsg_GetContentSecurityPolicy, IPC_SYNC_MESSAGE_ROUTED1_1(EwkHostMsg_WrtSyncMessage, tizen_webview::WrtIpcMessageData /* data */, std::string /*result*/); +#endif IPC_MESSAGE_ROUTED3(EwkViewMsg_Scale, double, /* scale factor */ @@ -244,15 +265,19 @@ IPC_MESSAGE_ROUTED2(EwkHostMsg_PlainTextGetContents, std::string, /* contentText */ int /* callback id */) +#if !defined(EWK_BRINGUP) IPC_MESSAGE_ROUTED1(EwkHostMsg_WrtMessage, tizen_webview::WrtIpcMessageData /* data */); +#endif IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeContentsSize, int, /* width */ int /* height */) +#if !defined(EWK_BRINGUP) IPC_MESSAGE_ROUTED1(EwkViewMsg_SelectionTextStyleState, SelectionStylePrams /* params */) +#endif IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeMaxScrollOffset, int, /*max scrollX*/ @@ -262,6 +287,7 @@ IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeScrollOffset, int, /*scrollX*/ int /*scrollY*/) +#if !defined(EWK_BRINGUP) IPC_MESSAGE_CONTROL3(EwkViewHostMsg_HitTestReply, int, /* render_view_id */ _Ewk_Hit_Test, /* Ewk Hit test data without node map */ @@ -272,6 +298,7 @@ IPC_MESSAGE_CONTROL4(EwkViewHostMsg_HitTestAsyncReply, _Ewk_Hit_Test, /* Ewk Hit test data without node map */ NodeAttributesMap, /* node attributes */ int64_t /* request id */) +#endif IPC_MESSAGE_ROUTED1(EwkViewMsg_GetMHTMLData, int /* callback id */) diff --git a/tizen_src/impl/wrt/wrt_url_parse.h b/tizen_src/chromium_impl/content/common/wrt/wrt_url_parse.h similarity index 100% rename from tizen_src/impl/wrt/wrt_url_parse.h rename to tizen_src/chromium_impl/content/common/wrt/wrt_url_parse.h diff --git a/tizen_src/chromium_impl/content/content_efl.gypi b/tizen_src/chromium_impl/content/content_efl.gypi index d91530e..63dee173 100644 --- a/tizen_src/chromium_impl/content/content_efl.gypi +++ b/tizen_src/chromium_impl/content/content_efl.gypi @@ -7,6 +7,7 @@ 'external_content_common_deps': [ '<(DEPTH)/tizen_src/build/system.gyp:ecore-x', '<(DEPTH)/tizen_src/build/system.gyp:capi-appfw-application', + '<(DEPTH)/tizen_src/build/system.gyp:gstreamer', ], 'external_content_browser_deps': [ '<(DEPTH)/tizen_src/build/system.gyp:ecore', @@ -15,6 +16,7 @@ '<(DEPTH)/tizen_src/build/system.gyp:elementary', '<(DEPTH)/tizen_src/build/system.gyp:efl-assist', '<(DEPTH)/tizen_src/chromium_impl/efl/efl.gyp:window-factory', + '<(DEPTH)/tizen_src/build/system.gyp:gstreamer', ], 'external_content_gpu_deps': [ '<(DEPTH)/tizen_src/build/system.gyp:evas', @@ -31,6 +33,7 @@ '<(DEPTH)/tizen_src/chromium_impl/ui/ui_targets_efl.gyp:ui_native_theme_inject', ], }, + 'target_defaults': { 'target_conditions': [ @@ -42,10 +45,17 @@ 'LOCALE_DIR="<(locale_dir)"', ], 'sources': [ + 'common/cache_params_efl.h', + 'common/navigation_policy_params.cc', + 'common/navigation_policy_params.h', + 'common/message_generator_efl.cc', + 'common/message_generator_efl.h', 'common/paths_efl.h', 'common/paths_efl.cc', + 'common/render_messages_efl.h', 'common/cursors/webcursor_efl.cc', 'common/cursors/webcursor_efl.h', + 'common/wrt/wrt_url_parse.h', ], 'conditions': [ ['building_for_tizen==1', { @@ -62,6 +72,16 @@ [ 'exclude', 'common/gpu/gpu_memory_buffer_factory_linux.cc' ], ] }], + ['tizen_multimedia_support==1', { + 'sources': [ + 'common/media/efl/media_player_messages_enums_efl.h', + 'common/media/efl/media_player_messages_efl.h', + 'common/gpu/media/efl/tizen_video_decode_accelerator.h', + 'common/gpu/media/efl/tizen_video_decode_accelerator.cc', + 'common/gpu/media/efl/tizen_video_encode_accelerator.h', + 'common/gpu/media/efl/tizen_video_encode_accelerator.cc', + ], + }], ], }], @@ -81,13 +101,46 @@ 'browser/renderer_host/web_event_factory_efl.h', 'browser/renderer_host/web_event_factory_efl.cc', ], + 'conditions': [ + ['tizen_multimedia_support==1', { + 'sources': [ + 'browser/media/media_web_contents_observer_efl.cc', + 'browser/media/media_web_contents_observer_efl.h', + 'browser/media/efl/webaudio_decoder_browser_gstreamer.cc', + 'browser/media/efl/webaudio_decoder_browser_gstreamer.h', + 'browser/media/efl/browser_demuxer_efl.cc', + 'browser/media/efl/browser_demuxer_efl.h', + 'browser/media/efl/browser_media_player_manager_efl.cc', + 'browser/media/efl/browser_media_player_manager_efl.h', + ], + }], + ], }], ['_target_name=="content_renderer"', { 'sources': [ + 'renderer/print_pages_params.h', + 'renderer/print_pages_params.cc', '<(DEPTH)/content/renderer/external_popup_menu.cc', '<(DEPTH)/content/renderer/external_popup_menu.h', ], + 'conditions': [ + ['tizen_multimedia_support==1', { + 'sources/': [ + [ 'exclude', 'renderer/media/audio_decoder\\.(cc|h)$' ], + ], + 'sources': [ + 'renderer/media/efl/audio_decoder_gstreamer.cc', + 'renderer/media/efl/audio_decoder_gstreamer.h', + 'renderer/media/efl/media_source_delegate_efl.cc', + 'renderer/media/efl/media_source_delegate_efl.h', + 'renderer/media/efl/renderer_demuxer_efl.cc', + 'renderer/media/efl/renderer_demuxer_efl.h', + 'renderer/media/efl/renderer_media_player_manager_efl.cc', + 'renderer/media/efl/renderer_media_player_manager_efl.h', + ], + }], + ], }], ['_target_name=="content_gpu"', { @@ -115,6 +168,7 @@ [ 'exclude', 'shell/app/shell_main.cc$' ], ], }], - ], - } + + ], # target_conditions + } # target_defaults } diff --git a/tizen_src/impl/content/renderer/media/tizen/audio_decoder_gstreamer.cc b/tizen_src/chromium_impl/content/renderer/media/efl/audio_decoder_gstreamer.cc similarity index 97% rename from tizen_src/impl/content/renderer/media/tizen/audio_decoder_gstreamer.cc rename to tizen_src/chromium_impl/content/renderer/media/efl/audio_decoder_gstreamer.cc index 4307899..9163fc4 100644 --- a/tizen_src/impl/content/renderer/media/tizen/audio_decoder_gstreamer.cc +++ b/tizen_src/chromium_impl/content/renderer/media/efl/audio_decoder_gstreamer.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/media/tizen/audio_decoder_gstreamer.h" +#include "content/renderer/media/efl/audio_decoder_gstreamer.h" #include "base/basictypes.h" #include "base/memory/shared_memory.h" @@ -10,12 +10,12 @@ #include "base/process/process.h" #include "base/strings/string_util.h" #include "base/time/time.h" -#include "common/render_messages_efl.h" +#include "content/common/render_messages_efl.h" #include "media/base/audio_bus.h" #include "media/base/limits.h" #include "public/platform/Platform.h" #include "third_party/WebKit/public/platform/WebAudioBus.h" -#include "media/base/tizen/webaudio_media_codec_info_tizen.h" +#include "media/base/efl/webaudio_media_codec_info_efl.h" namespace content { //This class is similar as AudioDecoderIO class of Android defined @@ -211,7 +211,7 @@ bool DecodeAudioFileData(blink::WebAudioBus* destination_bus, sender->Send(new EflViewHostMsg_GstWebAudioDecode(encoded_data_handle, fd, data_size)); int input_fd = audio_decoder.read_fd(); - struct media::WebAudioMediaCodecInfoTizen info; + struct media::WebAudioMediaCodecInfoEfl info; ssize_t nread = HANDLE_EINTR(read(input_fd, &info, sizeof(info))); diff --git a/tizen_src/impl/content/renderer/media/tizen/audio_decoder_gstreamer.h b/tizen_src/chromium_impl/content/renderer/media/efl/audio_decoder_gstreamer.h similarity index 100% rename from tizen_src/impl/content/renderer/media/tizen/audio_decoder_gstreamer.h rename to tizen_src/chromium_impl/content/renderer/media/efl/audio_decoder_gstreamer.h diff --git a/tizen_src/impl/content/renderer/media/tizen/media_source_delegate_tizen.cc b/tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.cc similarity index 83% rename from tizen_src/impl/content/renderer/media/tizen/media_source_delegate_tizen.cc rename to tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.cc index 8a14751..aa251f1 100644 --- a/tizen_src/impl/content/renderer/media/tizen/media_source_delegate_tizen.cc +++ b/tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/media/tizen/media_source_delegate_tizen.h" +#include "content/renderer/media/efl/media_source_delegate_efl.h" #include "base/process/process.h" #include "media/base/bind_to_current_loop.h" #include "media/base/media_log.h" -#include "media/base/tizen/demuxer_stream_player_params_tizen.h" +#include "media/base/efl/demuxer_stream_player_params_efl.h" #include "media/blink/webmediaplayer_util.h" #include "media/blink/webmediasource_impl.h" #include "media/filters/chunk_demuxer.h" @@ -22,8 +22,8 @@ static void LogMediaSourceError( media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error)); } -MediaSourceDelegateTizen::MediaSourceDelegateTizen( - RendererDemuxerTizen* demuxer_client, +MediaSourceDelegateEfl::MediaSourceDelegateEfl( + RendererDemuxerEfl* demuxer_client, int demuxer_client_id, const scoped_refptr& media_task_runner, media::MediaLog* media_log) @@ -47,12 +47,12 @@ MediaSourceDelegateTizen::MediaSourceDelegateTizen( is_video_read_fired_(false), is_demuxer_ready_(false), shared_memory_size_(0) { - VLOG(1) << "MediaSourceDelegateTizen::" << __FUNCTION__ + VLOG(1) << "MediaSourceDelegateEfl::" << __FUNCTION__ << ": Demuxer Client Id = " << demuxer_client_id_; DCHECK(!chunk_demuxer_); } -MediaSourceDelegateTizen::~MediaSourceDelegateTizen() { +MediaSourceDelegateEfl::~MediaSourceDelegateEfl() { DCHECK(main_loop_->BelongsToCurrentThread()); DCHECK(!chunk_demuxer_); DCHECK(!audio_stream_); @@ -61,7 +61,7 @@ MediaSourceDelegateTizen::~MediaSourceDelegateTizen() { DCHECK(!video_decrypting_demuxer_stream_); } -void MediaSourceDelegateTizen::InitializeMediaSource( +void MediaSourceDelegateEfl::InitializeMediaSource( const MediaSourceOpenedCB& media_source_opened_cb, const media::Demuxer::NeedKeyCB& need_key_cb, const media::SetDecryptorReadyCB& set_decryptor_ready_cb, @@ -77,28 +77,28 @@ void MediaSourceDelegateTizen::InitializeMediaSource( chunk_demuxer_.reset(new media::ChunkDemuxer( media::BindToCurrentLoop(base::Bind( - &MediaSourceDelegateTizen::OnDemuxerOpened, main_weak_this_)), + &MediaSourceDelegateEfl::OnDemuxerOpened, main_weak_this_)), media::BindToCurrentLoop(base::Bind( - &MediaSourceDelegateTizen::OnNeedKey, main_weak_this_)), + &MediaSourceDelegateEfl::OnNeedKey, main_weak_this_)), base::Bind(&LogMediaSourceError, media_log_), false)); media_task_runner_->PostTask(FROM_HERE, - base::Bind(&MediaSourceDelegateTizen::InitializeDemuxer, + base::Bind(&MediaSourceDelegateEfl::InitializeDemuxer, base::Unretained(this))); } -void MediaSourceDelegateTizen::InitializeDemuxer() { +void MediaSourceDelegateEfl::InitializeDemuxer() { DCHECK(media_task_runner_->BelongsToCurrentThread()); demuxer_client_->AddDelegate(demuxer_client_id_, this); chunk_demuxer_->Initialize( this, - base::Bind(&MediaSourceDelegateTizen::OnDemuxerInitDone, + base::Bind(&MediaSourceDelegateEfl::OnDemuxerInitDone, media_weak_factory_.GetWeakPtr()), false); } -void MediaSourceDelegateTizen::OnNeedKey( +void MediaSourceDelegateEfl::OnNeedKey( const std::string& type, const std::vector& init_data) { DCHECK(main_loop_->BelongsToCurrentThread()); @@ -108,7 +108,7 @@ void MediaSourceDelegateTizen::OnNeedKey( need_key_cb_.Run(type, init_data); } -void MediaSourceDelegateTizen::OnDemuxerOpened() { +void MediaSourceDelegateEfl::OnDemuxerOpened() { DCHECK(main_loop_->BelongsToCurrentThread()); if (media_source_opened_cb_.is_null()) return; @@ -116,13 +116,13 @@ void MediaSourceDelegateTizen::OnDemuxerOpened() { chunk_demuxer_.get(), base::Bind(&LogMediaSourceError, media_log_))); } -void MediaSourceDelegateTizen::OnDemuxerError( +void MediaSourceDelegateEfl::OnDemuxerError( media::PipelineStatus status) { if (status != media::PIPELINE_OK && !update_network_state_cb_.is_null()) update_network_state_cb_.Run(PipelineErrorToNetworkState(status)); } -void MediaSourceDelegateTizen::OnDemuxerInitDone( +void MediaSourceDelegateEfl::OnDemuxerInitDone( media::PipelineStatus status) { DCHECK(media_task_runner_->BelongsToCurrentThread()); DCHECK(chunk_demuxer_); @@ -147,18 +147,18 @@ void MediaSourceDelegateTizen::OnDemuxerInitDone( NotifyDemuxerReady(); } -void MediaSourceDelegateTizen::InitAudioDecryptingDemuxerStream() { +void MediaSourceDelegateEfl::InitAudioDecryptingDemuxerStream() { DCHECK(media_task_runner_->BelongsToCurrentThread()); audio_decrypting_demuxer_stream_.reset(new media::DecryptingDemuxerStream( media_task_runner_, set_decryptor_ready_cb_)); audio_decrypting_demuxer_stream_->Initialize( audio_stream_, - base::Bind(&MediaSourceDelegateTizen::OnAudioDecryptingDemuxerStreamInitDone, + base::Bind(&MediaSourceDelegateEfl::OnAudioDecryptingDemuxerStreamInitDone, media_weak_factory_.GetWeakPtr())); } -void MediaSourceDelegateTizen::InitVideoDecryptingDemuxerStream() { +void MediaSourceDelegateEfl::InitVideoDecryptingDemuxerStream() { DCHECK(media_task_runner_->BelongsToCurrentThread()); video_decrypting_demuxer_stream_.reset(new media::DecryptingDemuxerStream( @@ -166,12 +166,12 @@ void MediaSourceDelegateTizen::InitVideoDecryptingDemuxerStream() { video_decrypting_demuxer_stream_->Initialize( video_stream_, - base::Bind(&MediaSourceDelegateTizen::OnVideoDecryptingDemuxerStreamInitDone, + base::Bind(&MediaSourceDelegateEfl::OnVideoDecryptingDemuxerStreamInitDone, media_weak_factory_.GetWeakPtr())); } -void MediaSourceDelegateTizen::OnAudioDecryptingDemuxerStreamInitDone( +void MediaSourceDelegateEfl::OnAudioDecryptingDemuxerStreamInitDone( media::PipelineStatus status) { DCHECK(media_task_runner_->BelongsToCurrentThread()); DCHECK(chunk_demuxer_); @@ -192,7 +192,7 @@ void MediaSourceDelegateTizen::OnAudioDecryptingDemuxerStreamInitDone( NotifyDemuxerReady(); } -void MediaSourceDelegateTizen::OnVideoDecryptingDemuxerStreamInitDone( +void MediaSourceDelegateEfl::OnVideoDecryptingDemuxerStreamInitDone( media::PipelineStatus status) { DCHECK(media_task_runner_->BelongsToCurrentThread()); DCHECK(chunk_demuxer_); @@ -207,7 +207,7 @@ void MediaSourceDelegateTizen::OnVideoDecryptingDemuxerStreamInitDone( NotifyDemuxerReady(); } -void MediaSourceDelegateTizen::NotifyDemuxerReady() { +void MediaSourceDelegateEfl::NotifyDemuxerReady() { DCHECK(media_task_runner_->BelongsToCurrentThread()); DCHECK(is_demuxer_ready_); @@ -237,7 +237,7 @@ void MediaSourceDelegateTizen::NotifyDemuxerReady() { } } -void MediaSourceDelegateTizen::OnReadFromDemuxer( +void MediaSourceDelegateEfl::OnReadFromDemuxer( media::DemuxerStream::Type type) { DCHECK(media_task_runner_->BelongsToCurrentThread()); @@ -248,7 +248,7 @@ void MediaSourceDelegateTizen::OnReadFromDemuxer( && !is_audio_read_fired_) { is_audio_read_fired_ = true; audio_stream_->Read(base::Bind( - &MediaSourceDelegateTizen::OnBufferReady, + &MediaSourceDelegateEfl::OnBufferReady, media_weak_factory_.GetWeakPtr() , type)); } @@ -256,14 +256,14 @@ void MediaSourceDelegateTizen::OnReadFromDemuxer( && !is_video_read_fired_) { is_video_read_fired_ = true; video_stream_->Read(base::Bind( - &MediaSourceDelegateTizen::OnBufferReady, + &MediaSourceDelegateEfl::OnBufferReady, media_weak_factory_.GetWeakPtr() , type)); } } -void MediaSourceDelegateTizen::Stop(const base::Closure& stop_cb) { +void MediaSourceDelegateEfl::Stop(const base::Closure& stop_cb) { DCHECK(main_loop_->BelongsToCurrentThread()); - VLOG(1) << "MediaSourceDelegateTizen::" << __FUNCTION__ + VLOG(1) << "MediaSourceDelegateEfl::" << __FUNCTION__ << ": Demuxer Client Id = " << demuxer_client_id_; if (!chunk_demuxer_) { @@ -284,12 +284,12 @@ void MediaSourceDelegateTizen::Stop(const base::Closure& stop_cb) { chunk_demuxer_->Shutdown(); media_task_runner_->PostTask( FROM_HERE, - base::Bind(&MediaSourceDelegateTizen::StopDemuxer, + base::Bind(&MediaSourceDelegateEfl::StopDemuxer, base::Unretained(this), stop_cb)); } -void MediaSourceDelegateTizen::StopDemuxer(const base::Closure& stop_cb) { +void MediaSourceDelegateEfl::StopDemuxer(const base::Closure& stop_cb) { DCHECK(media_task_runner_->BelongsToCurrentThread()); DCHECK(chunk_demuxer_); @@ -309,19 +309,19 @@ void MediaSourceDelegateTizen::StopDemuxer(const base::Closure& stop_cb) { stop_cb.Run(); } -void MediaSourceDelegateTizen::OnMediaConfigRequest() { +void MediaSourceDelegateEfl::OnMediaConfigRequest() { NotifyDemuxerReady(); } -void MediaSourceDelegateTizen::SeekInternal( +void MediaSourceDelegateEfl::SeekInternal( const base::TimeDelta& seek_time) { DCHECK(media_task_runner_->BelongsToCurrentThread()); chunk_demuxer_->Seek(seek_time, base::Bind( - &MediaSourceDelegateTizen::OnDemuxerSeekDone, + &MediaSourceDelegateEfl::OnDemuxerSeekDone, media_weak_factory_.GetWeakPtr())); } -void MediaSourceDelegateTizen::OnBufferReady( +void MediaSourceDelegateEfl::OnBufferReady( media::DemuxerStream::Type type, media::DemuxerStream::Status status, const scoped_refptr& buffer) { @@ -383,7 +383,7 @@ void MediaSourceDelegateTizen::OnBufferReady( demuxer_client_->BufferMetaDataAck(demuxer_client_id_, *meta_data); } -void MediaSourceDelegateTizen::StartWaitingForSeek( +void MediaSourceDelegateEfl::StartWaitingForSeek( const base::TimeDelta& seek_time) { DCHECK(main_loop_->BelongsToCurrentThread()); @@ -396,7 +396,7 @@ void MediaSourceDelegateTizen::StartWaitingForSeek( chunk_demuxer_->StartWaitingForSeek(seek_time); } -void MediaSourceDelegateTizen::CancelPendingSeek( +void MediaSourceDelegateEfl::CancelPendingSeek( const base::TimeDelta& seek_time) { DCHECK(main_loop_->BelongsToCurrentThread()); if (!chunk_demuxer_) @@ -422,12 +422,12 @@ void MediaSourceDelegateTizen::CancelPendingSeek( chunk_demuxer_->CancelPendingSeek(seek_time); } -void MediaSourceDelegateTizen::StartSeek( +void MediaSourceDelegateEfl::StartSeek( const base::TimeDelta& seek_time, bool is_seeking_pending_seek) { DCHECK(media_task_runner_->BelongsToCurrentThread()); - VLOG(1)<< "MediaSourceDelegateTizen::" << __FUNCTION__ + VLOG(1)<< "MediaSourceDelegateEfl::" << __FUNCTION__ << " : " << seek_time.InSecondsF(); if (!chunk_demuxer_) return; @@ -436,14 +436,14 @@ void MediaSourceDelegateTizen::StartSeek( if (is_seeking_pending_seek) seeking_pending_seek_ = is_seeking_pending_seek; else if (seeking_pending_seek_) { - VLOG(1)<< "Ignoring seek request from Gstreamer"; + VLOG(1)<< "Ignoring seek request from Efl"; return; } seek_time_ = seek_time; SeekInternal(seek_time); } -void MediaSourceDelegateTizen::OnDemuxerSeekDone( +void MediaSourceDelegateEfl::OnDemuxerSeekDone( media::PipelineStatus status) { DCHECK(media_task_runner_->BelongsToCurrentThread()); if (status != media::PIPELINE_OK) { @@ -465,43 +465,43 @@ void MediaSourceDelegateTizen::OnDemuxerSeekDone( ResetAudioDecryptingDemuxerStream(); } -void MediaSourceDelegateTizen::ResetAudioDecryptingDemuxerStream() { +void MediaSourceDelegateEfl::ResetAudioDecryptingDemuxerStream() { DCHECK(media_task_runner_->BelongsToCurrentThread()); if (audio_decrypting_demuxer_stream_) { audio_decrypting_demuxer_stream_->Reset( - base::Bind(&MediaSourceDelegateTizen::ResetVideoDecryptingDemuxerStream, + base::Bind(&MediaSourceDelegateEfl::ResetVideoDecryptingDemuxerStream, media_weak_factory_.GetWeakPtr())); return; } ResetVideoDecryptingDemuxerStream(); } -void MediaSourceDelegateTizen::ResetVideoDecryptingDemuxerStream() { +void MediaSourceDelegateEfl::ResetVideoDecryptingDemuxerStream() { DCHECK(media_task_runner_->BelongsToCurrentThread()); if (video_decrypting_demuxer_stream_) { video_decrypting_demuxer_stream_->Reset(base::Bind( - &MediaSourceDelegateTizen::FinishResettingDecryptingDemuxerStreams, + &MediaSourceDelegateEfl::FinishResettingDecryptingDemuxerStreams, media_weak_factory_.GetWeakPtr())); return; } FinishResettingDecryptingDemuxerStreams(); } -void MediaSourceDelegateTizen::FinishResettingDecryptingDemuxerStreams() { +void MediaSourceDelegateEfl::FinishResettingDecryptingDemuxerStreams() { DCHECK(media_task_runner_->BelongsToCurrentThread()); DCHECK(is_seeking_); is_seeking_ = false; demuxer_client_->DemuxerSeekDone(demuxer_client_id_, seek_time_); } -void MediaSourceDelegateTizen::SetDuration(base::TimeDelta duration) { +void MediaSourceDelegateEfl::SetDuration(base::TimeDelta duration) { DCHECK(main_loop_->BelongsToCurrentThread()); main_loop_->PostTask(FROM_HERE, base::Bind( - &MediaSourceDelegateTizen::OnDurationChanged, + &MediaSourceDelegateEfl::OnDurationChanged, main_weak_this_, duration)); } -void MediaSourceDelegateTizen::OnDurationChanged( +void MediaSourceDelegateEfl::OnDurationChanged( const base::TimeDelta& duration) { DCHECK(main_loop_->BelongsToCurrentThread()); if (demuxer_client_) diff --git a/tizen_src/impl/content/renderer/media/tizen/media_source_delegate_tizen.h b/tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.h similarity index 90% rename from tizen_src/impl/content/renderer/media/tizen/media_source_delegate_tizen.h rename to tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.h index 8727771..a388c6b 100644 --- a/tizen_src/impl/content/renderer/media/tizen/media_source_delegate_tizen.h +++ b/tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_MEDIA_TIZEN_MEDIA_SOURCE_DELEGATE_TIZEN_H_ -#define CONTENT_RENDERER_MEDIA_TIZEN_MEDIA_SOURCE_DELEGATE_TIZEN_H_ +#ifndef CONTENT_RENDERER_MEDIA_TIZEN_MEDIA_SOURCE_DELEGATE_EFL_H_ +#define CONTENT_RENDERER_MEDIA_TIZEN_MEDIA_SOURCE_DELEGATE_EFL_H_ -#include "content/renderer/media/tizen/renderer_demuxer_tizen.h" +#include "content/renderer/media/efl/renderer_demuxer_efl.h" #include "media/base/decoder_buffer.h" #include "media/base/demuxer_stream.h" #include "media/base/media_keys.h" @@ -15,7 +15,7 @@ namespace content { -class MediaSourceDelegateTizen +class MediaSourceDelegateEfl : public media::DemuxerHost { public: typedef base::Callback @@ -24,12 +24,12 @@ public: UpdateNetworkStateCB; typedef base::Callback DurationChangeCB; - MediaSourceDelegateTizen( - RendererDemuxerTizen* demuxer_client, + MediaSourceDelegateEfl( + RendererDemuxerEfl* demuxer_client, int demuxer_client_id, const scoped_refptr& media_task_runner, media::MediaLog* media_log); - ~MediaSourceDelegateTizen(); + ~MediaSourceDelegateEfl(); //DemuxerHost implementation. virtual void AddBufferedTimeRange( @@ -119,13 +119,13 @@ public: // Message loop for main renderer thread and corresponding weak pointer. const scoped_refptr main_loop_; - base::WeakPtrFactory main_weak_factory_; - base::WeakPtr main_weak_this_; + base::WeakPtrFactory main_weak_factory_; + base::WeakPtr main_weak_this_; // Message loop for media thread and corresponding weak pointer. const scoped_refptr media_task_runner_; - base::WeakPtrFactory media_weak_factory_; - RendererDemuxerTizen* demuxer_client_; + base::WeakPtrFactory media_weak_factory_; + RendererDemuxerEfl* demuxer_client_; int demuxer_client_id_; scoped_refptr media_log_; @@ -168,4 +168,4 @@ public: } // namespace content -#endif // CONTENT_RENDERER_MEDIA_TIZEN_MEDIA_SOURCE_DELEGATE_TIZEN_H_ +#endif // CONTENT_RENDERER_MEDIA_TIZEN_MEDIA_SOURCE_DELEGATE_EFL_H_ diff --git a/tizen_src/impl/content/renderer/media/tizen/renderer_demuxer_tizen.cc b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_demuxer_efl.cc similarity index 65% rename from tizen_src/impl/content/renderer/media/tizen/renderer_demuxer_tizen.cc rename to tizen_src/chromium_impl/content/renderer/media/efl/renderer_demuxer_efl.cc index 7406988..1dcc2c6 100644 --- a/tizen_src/impl/content/renderer/media/tizen/renderer_demuxer_tizen.cc +++ b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_demuxer_efl.cc @@ -2,62 +2,62 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/media/tizen/renderer_demuxer_tizen.h" +#include "content/renderer/media/efl/renderer_demuxer_efl.h" #include "base/bind.h" #include "base/message_loop/message_loop.h" #include "content/child/thread_safe_sender.h" -#include "content/common/media/tizen/media_player_messages_tizen.h" -#include "content/renderer/media/tizen/media_source_delegate_tizen.h" -#include "content/renderer/media/tizen/renderer_media_player_manager_tizen.h" +#include "content/common/media/efl/media_player_messages_efl.h" +#include "content/renderer/media/efl/media_source_delegate_efl.h" +#include "content/renderer/media/efl/renderer_media_player_manager_efl.h" #include "content/renderer/render_thread_impl.h" namespace content { -RendererDemuxerTizen::RendererDemuxerTizen() +RendererDemuxerEfl::RendererDemuxerEfl() : thread_safe_sender_(RenderThreadImpl::current()->thread_safe_sender()), media_task_runner_( RenderThreadImpl::current()->GetMediaThreadTaskRunner()) {} -RendererDemuxerTizen::~RendererDemuxerTizen() {} +RendererDemuxerEfl::~RendererDemuxerEfl() {} -int RendererDemuxerTizen::GetNextDemuxerClientID() { +int RendererDemuxerEfl::GetNextDemuxerClientID() { // Don't use zero for IDs since it can be interpreted as having no ID. return next_demuxer_client_id_.GetNext() + 1; } -void RendererDemuxerTizen::AddDelegate( +void RendererDemuxerEfl::AddDelegate( int demuxer_client_id, - MediaSourceDelegateTizen* delegate) { + MediaSourceDelegateEfl* delegate) { DCHECK(media_task_runner_->BelongsToCurrentThread()); delegates_.AddWithID(delegate, demuxer_client_id); } -void RendererDemuxerTizen::RemoveDelegate(int demuxer_client_id) { +void RendererDemuxerEfl::RemoveDelegate(int demuxer_client_id) { DCHECK(media_task_runner_->BelongsToCurrentThread()); delegates_.Remove(demuxer_client_id); } -bool RendererDemuxerTizen::OnMessageReceived(const IPC::Message& message) { +bool RendererDemuxerEfl::OnMessageReceived(const IPC::Message& message) { switch (message.type()) { case MediaPlayerGstMsg_ReadFromDemuxer::ID: case MediaPlayerGstMsg_MediaConfigRequest::ID: case MediaPlayerGstMsg_DemuxerSeekRequest::ID: media_task_runner_->PostTask(FROM_HERE, base::Bind( - &RendererDemuxerTizen::DispatchMessage, this, message)); + &RendererDemuxerEfl::DispatchMessage, this, message)); return true; } return false; } -void RendererDemuxerTizen::DemuxerReady( +void RendererDemuxerEfl::DemuxerReady( int demuxer_client_id, const media::DemuxerConfigs& configs) { thread_safe_sender_->Send(new MediaPlayerGstHostMsg_DemuxerReady( demuxer_client_id, configs)); } -void RendererDemuxerTizen::ReadFromDemuxerAck( +void RendererDemuxerEfl::ReadFromDemuxerAck( int demuxer_client_id, base::SharedMemoryHandle foreign_memory_handle, const media::DemuxedBufferMetaData& meta_data) { @@ -65,28 +65,28 @@ void RendererDemuxerTizen::ReadFromDemuxerAck( demuxer_client_id, foreign_memory_handle, meta_data)); } -void RendererDemuxerTizen::BufferMetaDataAck( +void RendererDemuxerEfl::BufferMetaDataAck( int demuxer_client_id, const media::DemuxedBufferMetaData& meta_data) { thread_safe_sender_->Send(new MediaPlayerGstHostMsg_BufferMetaDataAck( demuxer_client_id, meta_data)); } -void RendererDemuxerTizen::DemuxerSeekDone( +void RendererDemuxerEfl::DemuxerSeekDone( int demuxer_client_id, const base::TimeDelta& actual_browser_seek_time) { thread_safe_sender_->Send(new MediaPlayerGstHostMsg_DemuxerSeekDone( demuxer_client_id, actual_browser_seek_time)); } -void RendererDemuxerTizen::DurationChanged(int demuxer_client_id, +void RendererDemuxerEfl::DurationChanged(int demuxer_client_id, const base::TimeDelta& duration) { thread_safe_sender_->Send(new MediaPlayerGstHostMsg_DurationChanged( demuxer_client_id, duration)); } -void RendererDemuxerTizen::DispatchMessage(const IPC::Message& message) { - IPC_BEGIN_MESSAGE_MAP(RendererDemuxerTizen, message) +void RendererDemuxerEfl::DispatchMessage(const IPC::Message& message) { + IPC_BEGIN_MESSAGE_MAP(RendererDemuxerEfl, message) IPC_MESSAGE_HANDLER(MediaPlayerGstMsg_ReadFromDemuxer, OnReadFromDemuxer) IPC_MESSAGE_HANDLER(MediaPlayerGstMsg_MediaConfigRequest, OnMediaConfigRequest) @@ -95,24 +95,24 @@ void RendererDemuxerTizen::DispatchMessage(const IPC::Message& message) { IPC_END_MESSAGE_MAP() } -void RendererDemuxerTizen::OnReadFromDemuxer( +void RendererDemuxerEfl::OnReadFromDemuxer( int demuxer_client_id, media::DemuxerStream::Type type) { - MediaSourceDelegateTizen* delegate = delegates_.Lookup(demuxer_client_id); + MediaSourceDelegateEfl* delegate = delegates_.Lookup(demuxer_client_id); if (delegate) delegate->OnReadFromDemuxer(type); } -void RendererDemuxerTizen::OnDemuxerSeekRequest( +void RendererDemuxerEfl::OnDemuxerSeekRequest( int demuxer_client_id, const base::TimeDelta& time_to_seek) { - MediaSourceDelegateTizen* delegate = delegates_.Lookup(demuxer_client_id); + MediaSourceDelegateEfl* delegate = delegates_.Lookup(demuxer_client_id); if (delegate) delegate->StartSeek(time_to_seek, false); } -void RendererDemuxerTizen::OnMediaConfigRequest(int demuxer_client_id) { - MediaSourceDelegateTizen* delegate = delegates_.Lookup(demuxer_client_id); +void RendererDemuxerEfl::OnMediaConfigRequest(int demuxer_client_id) { + MediaSourceDelegateEfl* delegate = delegates_.Lookup(demuxer_client_id); if (delegate) delegate->OnMediaConfigRequest(); } diff --git a/tizen_src/impl/content/renderer/media/tizen/renderer_demuxer_tizen.h b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_demuxer_efl.h similarity index 74% rename from tizen_src/impl/content/renderer/media/tizen/renderer_demuxer_tizen.h rename to tizen_src/chromium_impl/content/renderer/media/efl/renderer_demuxer_efl.h index 68958b5..21b0444 100644 --- a/tizen_src/impl/content/renderer/media/tizen/renderer_demuxer_tizen.h +++ b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_demuxer_efl.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_MEDIA_TIZEN_RENDERER_DEMUXER_TIZEN_H_ -#define CONTENT_RENDERER_MEDIA_TIZEN_RENDERER_DEMUXER_TIZEN_H_ +#ifndef CONTENT_RENDERER_MEDIA_TIZEN_RENDERER_DEMUXER_EFL_H_ +#define CONTENT_RENDERER_MEDIA_TIZEN_RENDERER_DEMUXER_EFL_H_ #include "base/atomic_sequence_num.h" #include "base/id_map.h" #include "ipc/message_filter.h" -#include "media/base/tizen/demuxer_stream_player_params_tizen.h" +#include "media/base/efl/demuxer_stream_player_params_efl.h" namespace base { class SingleThreadTaskRunner; @@ -16,16 +16,16 @@ class SingleThreadTaskRunner; namespace content { -class MediaSourceDelegateTizen; +class MediaSourceDelegateEfl; class ThreadSafeSender; // Represents the renderer process half of an IPC-based implementation of -// media::DemuxerTizen. +// media::DemuxerEfl. // -// Refer to BrowserDemuxerTizen for the browser process half. -class RendererDemuxerTizen : public IPC::MessageFilter { +// Refer to BrowserDemuxerEfl for the browser process half. +class RendererDemuxerEfl : public IPC::MessageFilter { public: - RendererDemuxerTizen(); + RendererDemuxerEfl(); // Returns the next available demuxer client ID for use in IPC messages. // @@ -38,7 +38,7 @@ class RendererDemuxerTizen : public IPC::MessageFilter { // Must be called on media thread. void AddDelegate( int demuxer_client_id, - MediaSourceDelegateTizen* delegate); + MediaSourceDelegateEfl* delegate); // Removes the association created by AddDelegate(). // @@ -48,7 +48,7 @@ class RendererDemuxerTizen : public IPC::MessageFilter { // IPC::ChannelProxy::MessageFilter overrides. virtual bool OnMessageReceived(const IPC::Message& message) override; - // media::DemuxerTizenClient "implementation". + // media::DemuxerEflClient "implementation". void DemuxerReady( int demuxer_client_id, const media::DemuxerConfigs& configs); @@ -65,8 +65,8 @@ class RendererDemuxerTizen : public IPC::MessageFilter { void DurationChanged(int demuxer_client_id, const base::TimeDelta& duration); protected: - friend class base::RefCountedThreadSafe; - virtual ~RendererDemuxerTizen(); + friend class base::RefCountedThreadSafe; + virtual ~RendererDemuxerEfl(); private: void DispatchMessage(const IPC::Message& message); @@ -78,13 +78,13 @@ class RendererDemuxerTizen : public IPC::MessageFilter { base::AtomicSequenceNumber next_demuxer_client_id_; - IDMap delegates_; + IDMap delegates_; scoped_refptr thread_safe_sender_; scoped_refptr media_task_runner_; - DISALLOW_COPY_AND_ASSIGN(RendererDemuxerTizen); + DISALLOW_COPY_AND_ASSIGN(RendererDemuxerEfl); }; } // namespace content -#endif // CONTENT_RENDERER_MEDIA_TIZEN_RENDERER_DEMUXER_TIZEN_H_ \ No newline at end of file +#endif // CONTENT_RENDERER_MEDIA_TIZEN_RENDERER_DEMUXER_EFL_H_ diff --git a/tizen_src/impl/content/renderer/media/tizen/renderer_media_player_manager_tizen.cc b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_media_player_manager_efl.cc similarity index 59% rename from tizen_src/impl/content/renderer/media/tizen/renderer_media_player_manager_tizen.cc rename to tizen_src/chromium_impl/content/renderer/media/efl/renderer_media_player_manager_efl.cc index f7733fb..a56c248 100644 --- a/tizen_src/impl/content/renderer/media/tizen/renderer_media_player_manager_tizen.cc +++ b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_media_player_manager_efl.cc @@ -2,31 +2,31 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/media/tizen/renderer_media_player_manager_tizen.h" +#include "content/renderer/media/efl/renderer_media_player_manager_efl.h" #include "base/bind.h" #include "base/message_loop/message_loop.h" -#include "content/common/media/tizen/media_player_messages_tizen.h" +#include "content/common/media/efl/media_player_messages_efl.h" #include "ui/gfx/rect_f.h" namespace content { -RendererMediaPlayerManagerTizen::RendererMediaPlayerManagerTizen( +RendererMediaPlayerManagerEfl::RendererMediaPlayerManagerEfl( RenderFrame* render_frame) : RenderFrameObserver(render_frame), next_media_player_id_(0) { } -RendererMediaPlayerManagerTizen::~RendererMediaPlayerManagerTizen() { +RendererMediaPlayerManagerEfl::~RendererMediaPlayerManagerEfl() { DCHECK(media_players_.empty()) - << "RendererMediaPlayerManagerTizen is owned by RenderFrameImpl and is " + << "RendererMediaPlayerManagerEfl is owned by RenderFrameImpl and is " "destroyed only after all media players are destroyed."; } -void RendererMediaPlayerManagerTizen::PausePlayingPlayers() { - std::map::iterator player_it; +void RendererMediaPlayerManagerEfl::PausePlayingPlayers() { + std::map::iterator player_it; for (player_it = media_players_.begin();player_it != media_players_.end();) { - media::WebMediaPlayerTizen* player = player_it->second; + media::WebMediaPlayerEfl* player = player_it->second; // Element pointed by the iterator can get deleted during the function call // "player->RequestPause()", hence increment the iterator beforehand ++player_it; @@ -35,10 +35,10 @@ void RendererMediaPlayerManagerTizen::PausePlayingPlayers() { } } -bool RendererMediaPlayerManagerTizen::OnMessageReceived( +bool RendererMediaPlayerManagerEfl::OnMessageReceived( const IPC::Message& message) { bool handled = true; - IPC_BEGIN_MESSAGE_MAP(RendererMediaPlayerManagerTizen, message) + IPC_BEGIN_MESSAGE_MAP(RendererMediaPlayerManagerEfl, message) IPC_MESSAGE_HANDLER(MediaPlayerGstMsg_MediaDataChanged, OnMediaDataChange) IPC_MESSAGE_HANDLER(MediaPlayerGstMsg_DurationChanged, OnDurationChange) IPC_MESSAGE_HANDLER(MediaPlayerGstMsg_TimeUpdate, OnTimeUpdate) @@ -62,7 +62,7 @@ bool RendererMediaPlayerManagerTizen::OnMessageReceived( return handled; } -void RendererMediaPlayerManagerTizen::Initialize( +void RendererMediaPlayerManagerEfl::Initialize( int player_id, MediaPlayerHostMsg_Initialize_Type type, const GURL& url, @@ -72,113 +72,113 @@ void RendererMediaPlayerManagerTizen::Initialize( routing_id(), player_id, type, url, volume, demuxer_client_id)); } -void RendererMediaPlayerManagerTizen::OnMediaDataChange( +void RendererMediaPlayerManagerEfl::OnMediaDataChange( int player_id, int format, int height, int width, int media) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnMediaDataChange(format, height, width, media); } -void RendererMediaPlayerManagerTizen::OnDurationChange( +void RendererMediaPlayerManagerEfl::OnDurationChange( int player_id, double duration) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnDurationChange(duration); } -void RendererMediaPlayerManagerTizen::OnTimeUpdate( +void RendererMediaPlayerManagerEfl::OnTimeUpdate( int player_id, double current_time) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnTimeUpdate(current_time); } -void RendererMediaPlayerManagerTizen::OnBufferUpdate( +void RendererMediaPlayerManagerEfl::OnBufferUpdate( int player_id, - std::vector buffer_range) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + std::vector buffer_range) { + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnBufferUpdate(buffer_range); } -void RendererMediaPlayerManagerTizen::OnReadyStateChange( +void RendererMediaPlayerManagerEfl::OnReadyStateChange( int player_id, - media::MediaPlayerTizen::ReadyState state) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::MediaPlayerEfl::ReadyState state) { + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->SetReadyState( static_cast(state)); } -void RendererMediaPlayerManagerTizen::OnNetworkStateChange( +void RendererMediaPlayerManagerEfl::OnNetworkStateChange( int player_id, - media::MediaPlayerTizen::NetworkState state) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::MediaPlayerEfl::NetworkState state) { + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->SetNetworkState( static_cast(state)); } -void RendererMediaPlayerManagerTizen::OnTimeChanged(int player_id) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); +void RendererMediaPlayerManagerEfl::OnTimeChanged(int player_id) { + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnTimeChanged(); } -void RendererMediaPlayerManagerTizen::OnPauseStateChange( +void RendererMediaPlayerManagerEfl::OnPauseStateChange( int player_id, bool state) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnPauseStateChange(state); } -void RendererMediaPlayerManagerTizen::OnSeekStateChange( +void RendererMediaPlayerManagerEfl::OnSeekStateChange( int player_id, bool state) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnSeekStateChange(state); } -void RendererMediaPlayerManagerTizen::OnRequestSeek( +void RendererMediaPlayerManagerEfl::OnRequestSeek( int player_id, double seek_time) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnRequestSeek(seek_time); } -void RendererMediaPlayerManagerTizen::OnNewFrameAvailable( +void RendererMediaPlayerManagerEfl::OnNewFrameAvailable( int player_id, base::SharedMemoryHandle foreign_memory_handle, uint32 length, base::TimeDelta timestamp) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); // FIXME: Handle exception for all APIs. if (player) player->OnNewFrameAvailable(foreign_memory_handle, length, timestamp); } #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) -void RendererMediaPlayerManagerTizen::OnPlatformSurfaceUpdated( +void RendererMediaPlayerManagerEfl::OnPlatformSurfaceUpdated( int player_id, int pixmap_id, base::TimeDelta timestamp) { - media::WebMediaPlayerTizen* player = GetMediaPlayer(player_id); + media::WebMediaPlayerEfl* player = GetMediaPlayer(player_id); if (player) player->OnPlatformSurfaceUpdated(pixmap_id, timestamp); } #endif -media::WebMediaPlayerTizen* RendererMediaPlayerManagerTizen::GetMediaPlayer( +media::WebMediaPlayerEfl* RendererMediaPlayerManagerEfl::GetMediaPlayer( int player_id) { - std::map::iterator iter = + std::map::iterator iter = media_players_.find(player_id); if (iter != media_players_.end()) return iter->second; @@ -186,42 +186,42 @@ media::WebMediaPlayerTizen* RendererMediaPlayerManagerTizen::GetMediaPlayer( return NULL; } -void RendererMediaPlayerManagerTizen::Play(int player_id) { +void RendererMediaPlayerManagerEfl::Play(int player_id) { Send(new MediaPlayerGstHostMsg_Play(routing_id(), player_id)); } -void RendererMediaPlayerManagerTizen::Pause( +void RendererMediaPlayerManagerEfl::Pause( int player_id, bool is_media_related_action) { Send(new MediaPlayerGstHostMsg_Pause(routing_id(), player_id)); } -void RendererMediaPlayerManagerTizen::Seek(int player_id, double time) { +void RendererMediaPlayerManagerEfl::Seek(int player_id, double time) { Send(new MediaPlayerGstHostMsg_Seek(routing_id(), player_id, time)); } -void RendererMediaPlayerManagerTizen::SetVolume(int player_id, double volume) { +void RendererMediaPlayerManagerEfl::SetVolume(int player_id, double volume) { Send(new MediaPlayerGstHostMsg_SetVolume(routing_id(), player_id, volume)); } -void RendererMediaPlayerManagerTizen::SetRate(int player_id, double rate) { +void RendererMediaPlayerManagerEfl::SetRate(int player_id, double rate) { Send(new MediaPlayerGstHostMsg_SetRate(routing_id(), player_id, rate)); } -void RendererMediaPlayerManagerTizen::DestroyPlayer(int player_id) { - VLOG(1) << "RendererMediaPlayerManagerTizen::" << __FUNCTION__ +void RendererMediaPlayerManagerEfl::DestroyPlayer(int player_id) { + VLOG(1) << "RendererMediaPlayerManagerEfl::" << __FUNCTION__ << " Plyer-Id = " << player_id; Send(new MediaPlayerGstHostMsg_DeInit(routing_id(), player_id)); } -int RendererMediaPlayerManagerTizen::RegisterMediaPlayer( - media::WebMediaPlayerTizen* player) { +int RendererMediaPlayerManagerEfl::RegisterMediaPlayer( + media::WebMediaPlayerEfl* player) { media_players_[next_media_player_id_] = player; return next_media_player_id_++; } -void RendererMediaPlayerManagerTizen::UnregisterMediaPlayer(int player_id) { - VLOG(1) << "RendererMediaPlayerManagerTizen::" << __FUNCTION__ +void RendererMediaPlayerManagerEfl::UnregisterMediaPlayer(int player_id) { + VLOG(1) << "RendererMediaPlayerManagerEfl::" << __FUNCTION__ << " Player-Id = " << player_id; media_players_.erase(player_id); } diff --git a/tizen_src/impl/content/renderer/media/tizen/renderer_media_player_manager_tizen.h b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_media_player_manager_efl.h similarity index 73% rename from tizen_src/impl/content/renderer/media/tizen/renderer_media_player_manager_tizen.h rename to tizen_src/chromium_impl/content/renderer/media/efl/renderer_media_player_manager_efl.h index 8f1140e..7459902 100644 --- a/tizen_src/impl/content/renderer/media/tizen/renderer_media_player_manager_tizen.h +++ b/tizen_src/chromium_impl/content/renderer/media/efl/renderer_media_player_manager_efl.h @@ -6,23 +6,23 @@ #define CONTENT_RENDERER_MEDIA_TIZEN_RENDERER_MEDIA_PLAYER_TIZEN_MANAGER_H_ #include "content/public/renderer/render_frame_observer.h" -#include "media/base/tizen/media_player_tizen.h" -#include "media/base/tizen/webmediaplayer_tizen.h" +#include "media/base/efl/media_player_efl.h" +#include "media/base/efl/webmediaplayer_efl.h" #include "url/gurl.h" namespace media { -class WebMediaPlayerTizen; +class WebMediaPlayerEfl; } namespace content { -class RendererMediaPlayerManagerTizen : public RenderFrameObserver { +class RendererMediaPlayerManagerEfl : public RenderFrameObserver { public: - // Constructs a RendererMediaPlayerManagerTizen object for the |render_frame|. - explicit RendererMediaPlayerManagerTizen(RenderFrame* render_frame); - virtual ~RendererMediaPlayerManagerTizen(); + // Constructs a RendererMediaPlayerManagerEfl object for the |render_frame|. + explicit RendererMediaPlayerManagerEfl(RenderFrame* render_frame); + virtual ~RendererMediaPlayerManagerEfl(); - // Initializes a MediaPlayerTizen object in browser process. + // Initializes a MediaPlayerEfl object in browser process. void Initialize( int player_id, MediaPlayerHostMsg_Initialize_Type type, @@ -52,13 +52,13 @@ class RendererMediaPlayerManagerTizen : public RenderFrameObserver { // Destroys the player in the browser process void DestroyPlayer(int player_id); - // Registers and unregisters a WebMediaPlayerTizen object. - int RegisterMediaPlayer(media::WebMediaPlayerTizen* player); + // Registers and unregisters a WebMediaPlayerEfl object. + int RegisterMediaPlayer(media::WebMediaPlayerEfl* player); void UnregisterMediaPlayer(int player_id); bool OnMessageReceived(const IPC::Message& message) override; - media::WebMediaPlayerTizen* GetMediaPlayer(int player_id); + media::WebMediaPlayerEfl* GetMediaPlayer(int player_id); //Pause the playing media players when tab/webpage goes to background void PausePlayingPlayers(); @@ -86,24 +86,24 @@ class RendererMediaPlayerManagerTizen : public RenderFrameObserver { void OnTimeUpdate(int player_id, double current_time); void OnBufferUpdate( int player_id, - std::vector buffer_range); + std::vector buffer_range); void OnTimeChanged(int player_id); void OnPauseStateChange(int player_id, bool state); void OnSeekStateChange(int player_id, bool state); void OnRequestSeek(int player_id, double seek_time); void OnReadyStateChange( int player_id, - media::MediaPlayerTizen::ReadyState state ); + media::MediaPlayerEfl::ReadyState state ); void OnNetworkStateChange( int player_id, - media::MediaPlayerTizen::NetworkState state ); + media::MediaPlayerEfl::NetworkState state ); private: - std::map media_players_; + std::map media_players_; int next_media_player_id_; - DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManagerTizen); + DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManagerEfl); }; } // namespace content diff --git a/tizen_src/impl/renderer/print_pages_params.cc b/tizen_src/chromium_impl/content/renderer/print_pages_params.cc similarity index 78% rename from tizen_src/impl/renderer/print_pages_params.cc rename to tizen_src/chromium_impl/content/renderer/print_pages_params.cc index 5e768e2..6635ad1 100644 --- a/tizen_src/impl/renderer/print_pages_params.cc +++ b/tizen_src/chromium_impl/content/renderer/print_pages_params.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "renderer/print_pages_params.h" +#include "content/renderer/print_pages_params.h" + +namespace content { PrintParams::PrintParams() : page_size(), @@ -19,3 +21,8 @@ PrintParams::PrintParams() PrintPagesParams::PrintPagesParams() : pages() { } + +PrintPagesParams::~PrintPagesParams(){ +} + +} // namespace content diff --git a/tizen_src/impl/renderer/print_pages_params.h b/tizen_src/chromium_impl/content/renderer/print_pages_params.h similarity index 94% rename from tizen_src/impl/renderer/print_pages_params.h rename to tizen_src/chromium_impl/content/renderer/print_pages_params.h index a5cef1f..5f0a770 100644 --- a/tizen_src/impl/renderer/print_pages_params.h +++ b/tizen_src/chromium_impl/content/renderer/print_pages_params.h @@ -15,6 +15,8 @@ #include "ui/gfx/rect.h" #include "ui/gfx/size.h" +namespace content { + struct PrintParams { PrintParams(); @@ -32,6 +34,7 @@ struct PrintParams { // collection of printable pages struct PrintPagesParams { PrintPagesParams(); + ~PrintPagesParams(); PrintParams params; std::vector pages; @@ -50,4 +53,6 @@ struct DidPrintPagesParams { base::FilePath filename; }; +} // namespace content + #endif // PRINT_PAGES_PARAMS_H_ diff --git a/tizen_src/impl/media/audio/tizen/audio_session_manager.cc b/tizen_src/chromium_impl/media/audio/tizen/audio_session_manager.cc similarity index 100% rename from tizen_src/impl/media/audio/tizen/audio_session_manager.cc rename to tizen_src/chromium_impl/media/audio/tizen/audio_session_manager.cc diff --git a/tizen_src/impl/media/audio/tizen/audio_session_manager.h b/tizen_src/chromium_impl/media/audio/tizen/audio_session_manager.h similarity index 100% rename from tizen_src/impl/media/audio/tizen/audio_session_manager.h rename to tizen_src/chromium_impl/media/audio/tizen/audio_session_manager.h diff --git a/tizen_src/impl/media/base/tizen/demuxer_tizen.h b/tizen_src/chromium_impl/media/base/efl/demuxer_efl.h similarity index 85% rename from tizen_src/impl/media/base/tizen/demuxer_tizen.h rename to tizen_src/chromium_impl/media/base/efl/demuxer_efl.h index 25874ad..bb219fe 100644 --- a/tizen_src/impl/media/base/tizen/demuxer_tizen.h +++ b/tizen_src/chromium_impl/media/base/efl/demuxer_efl.h @@ -5,12 +5,12 @@ #ifndef MEDIA_BASE_TIZEN_DEMUXER_TIZEN_H_ #define MEDIA_BASE_TIZEN_DEMUXER_TIZEN_H_ -#include "media/base/tizen/demuxer_stream_player_params_tizen.h" +#include "media/base/efl/demuxer_stream_player_params_efl.h" namespace media { // Defines the client callback interface. -class MEDIA_EXPORT DemuxerTizenClient { +class MEDIA_EXPORT DemuxerEflClient { public: // Called in response to RequestDemuxerConfigs() and also when the demuxer @@ -34,17 +34,17 @@ class MEDIA_EXPORT DemuxerTizenClient { virtual void OnDemuxerDurationChanged(base::TimeDelta duration) = 0; protected: - virtual ~DemuxerTizenClient() {} + virtual ~DemuxerEflClient() {} }; // Defines a demuxer with asynchronous operations. -class MEDIA_EXPORT DemuxerTizen { +class MEDIA_EXPORT DemuxerEfl { public: - virtual ~DemuxerTizen() {} + virtual ~DemuxerEfl() {} // Initializes this demuxer with |client| as the callback handler. // Must be called prior to calling any other methods. - virtual void Initialize(DemuxerTizenClient* client) = 0; + virtual void Initialize(DemuxerEflClient* client) = 0; // Called to request the current audio/video decoder configurations. virtual void RequestDemuxerConfigs() = 0; @@ -58,4 +58,4 @@ class MEDIA_EXPORT DemuxerTizen { } // namespace media -#endif // MEDIA_BASE_TIZEN_DEMUXER_TIZEN_H_ \ No newline at end of file +#endif // MEDIA_BASE_TIZEN_DEMUXER_TIZEN_H_ diff --git a/tizen_src/impl/media/base/tizen/demuxer_stream_player_params_tizen.cc b/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.cc similarity index 91% rename from tizen_src/impl/media/base/tizen/demuxer_stream_player_params_tizen.cc rename to tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.cc index e759eb2..3e90f65 100644 --- a/tizen_src/impl/media/base/tizen/demuxer_stream_player_params_tizen.cc +++ b/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "media/base/tizen/demuxer_stream_player_params_tizen.h" +#include "media/base/efl/demuxer_stream_player_params_efl.h" namespace media { diff --git a/tizen_src/impl/media/base/tizen/demuxer_stream_player_params_tizen.h b/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.h similarity index 90% rename from tizen_src/impl/media/base/tizen/demuxer_stream_player_params_tizen.h rename to tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.h index 8e07db7..a9936fa 100644 --- a/tizen_src/impl/media/base/tizen/demuxer_stream_player_params_tizen.h +++ b/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef MEDIA_BASE_TIZEN_DEMUXER_STREAM_PLAYER_PARAMS_TIZEN_H_ -#define MEDIA_BASE_TIZEN_DEMUXER_STREAM_PLAYER_PARAMS_TIZEN_H_ +#ifndef MEDIA_BASE_TIZEN_DEMUXER_STREAM_PLAYER_PARAMS_EFL_H_ +#define MEDIA_BASE_TIZEN_DEMUXER_STREAM_PLAYER_PARAMS_EFL_H_ #include diff --git a/tizen_src/impl/media/base/tizen/media_player_bridge_gstreamer.cc b/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.cc similarity index 95% rename from tizen_src/impl/media/base/tizen/media_player_bridge_gstreamer.cc rename to tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.cc index 055e3f0..a0f2b00 100644 --- a/tizen_src/impl/media/base/tizen/media_player_bridge_gstreamer.cc +++ b/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "media/base/tizen/media_player_bridge_gstreamer.h" +#include "media/base/efl/media_player_bridge_gstreamer.h" #include #include @@ -11,7 +11,7 @@ #include "base/basictypes.h" #include "base/message_loop/message_loop_proxy.h" -#include "media/base/tizen/media_player_manager_tizen.h" +#include "media/base/efl/media_player_manager_efl.h" #include "ui/gfx/size.h" #if defined(OS_TIZEN_MOBILE) && (defined(TIZEN_V_2_3) || defined(TIZEN_V_2_4)) @@ -181,7 +181,7 @@ MediaPlayerBridgeGstreamer::MediaPlayerBridgeGstreamer( const GURL& url, double volume, MediaPlayerManager* manager_in) - : MediaPlayerTizen(player_id, manager_in), + : MediaPlayerEfl(player_id, manager_in), main_loop_(base::MessageLoopProxy::current()), gst_playbin_(NULL), gst_appsink_(NULL), @@ -242,7 +242,7 @@ MediaPlayerBridgeGstreamer::MediaPlayerBridgeGstreamer( GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(gst_playbin_)); if (!bus) { LOG(ERROR) << "GStreamer bus creation failed"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); return; } #if GST_VERSION_MAJOR == 1 @@ -269,9 +269,9 @@ MediaPlayerBridgeGstreamer::MediaPlayerBridgeGstreamer( LOG(ERROR) << "GStreamer state change failed"; manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveEnoughData); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveEnoughData); manager()->OnNetworkStateChange( - GetPlayerId(), MediaPlayerTizen::NetworkStateLoaded); + GetPlayerId(), MediaPlayerEfl::NetworkStateLoaded); if(url_.SchemeIsFile()) is_file_url_ = true; @@ -285,11 +285,11 @@ MediaPlayerBridgeGstreamer::MediaPlayerBridgeGstreamer( gst_appsink_ = NULL; } LOG(ERROR) << "Unable to create GStreamer elements"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); } } else { LOG(ERROR) << "Unable to initialize GST"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); } } @@ -395,7 +395,7 @@ void MediaPlayerBridgeGstreamer::SetRate(double rate) { playback_rate_ = rate; } else { LOG(ERROR) << "Setting Rate " << rate << " failed"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); } } @@ -537,8 +537,8 @@ void MediaPlayerBridgeGstreamer::UpdateDuration() { manager()->OnDurationChange(GetPlayerId(), duration_); // No need to sample 'local file'. Update buffered percentage. if(is_file_url_) { - std::vector buffer_range; - media::MediaPlayerTizen::TimeRanges range; + std::vector buffer_range; + media::MediaPlayerEfl::TimeRanges range; range.start = 0; range.end = duration_ * base::Time::kMicrosecondsPerSecond; buffer_range.push_back(range); @@ -729,7 +729,7 @@ void MediaPlayerBridgeGstreamer::GetBufferedTimeRanges() { GstQuery *query = NULL; gboolean result = false; media::Ranges time_ranges; - std::vector buffer_range; + std::vector buffer_range; query = gst_query_new_buffering (GST_FORMAT_PERCENT); result = gst_element_query(gst_playbin_, query); if (result) { @@ -738,7 +738,7 @@ void MediaPlayerBridgeGstreamer::GetBufferedTimeRanges() { for (range = 0; range < n_ranges; range++) { gint64 start = 0, stop = 0; gst_query_parse_nth_buffering_range(query, range, &start, &stop); - media::MediaPlayerTizen::TimeRanges b_range; + media::MediaPlayerEfl::TimeRanges b_range; #if GST_VERSION_MAJOR == 1 if ((start == 0 || is_end_reached_) && @@ -795,18 +795,18 @@ void MediaPlayerBridgeGstreamer::HandleMessage(GstMessage* message) { StopBufferingUpdateTimer(); GError* error; gst_message_parse_error(message, &error, NULL); - MediaPlayerTizen::NetworkState network_state_error; - network_state_error = MediaPlayerTizen::NetworkStateEmpty; + MediaPlayerEfl::NetworkState network_state_error; + network_state_error = MediaPlayerEfl::NetworkStateEmpty; if (error->code == GST_STREAM_ERROR_CODEC_NOT_FOUND || error->code == GST_STREAM_ERROR_WRONG_TYPE || error->code == GST_STREAM_ERROR_FAILED || error->code == GST_CORE_ERROR_MISSING_PLUGIN || error->code == GST_RESOURCE_ERROR_NOT_FOUND) { - network_state_error = MediaPlayerTizen::NetworkStateFormatError; + network_state_error = MediaPlayerEfl::NetworkStateFormatError; } else if (error->domain == GST_RESOURCE_ERROR) { - network_state_error = MediaPlayerTizen::NetworkStateNetworkError; + network_state_error = MediaPlayerEfl::NetworkStateNetworkError; } else { - network_state_error = MediaPlayerTizen::NetworkStateDecodeError; + network_state_error = MediaPlayerEfl::NetworkStateDecodeError; } LOG(ERROR) << "Error Message : " << error->message << " Recieved From : " @@ -885,7 +885,7 @@ void MediaPlayerBridgeGstreamer::HandlePluginInstallerResult( gst_element_set_state(gst_playbin_, GST_STATE_PAUSED); } else { LOG(ERROR) << "GST Plugin Installation failed"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); } } @@ -920,15 +920,15 @@ void MediaPlayerBridgeGstreamer::UpdateStates() { switch (state) { case GST_STATE_NULL: manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveNothing); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveNothing); manager()->OnNetworkStateChange( - GetPlayerId(), MediaPlayerTizen::NetworkStateEmpty); + GetPlayerId(), MediaPlayerEfl::NetworkStateEmpty); break; case GST_STATE_READY: manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveMetadata); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveMetadata); manager()->OnNetworkStateChange( - GetPlayerId(), MediaPlayerTizen::NetworkStateEmpty); + GetPlayerId(), MediaPlayerEfl::NetworkStateEmpty); break; case GST_STATE_PAUSED: case GST_STATE_PLAYING: @@ -958,18 +958,18 @@ void MediaPlayerBridgeGstreamer::UpdateStates() { base::Unretained(this))); } manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveEnoughData); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveEnoughData); manager()->OnNetworkStateChange( - GetPlayerId(), MediaPlayerTizen::NetworkStateLoaded); + GetPlayerId(), MediaPlayerEfl::NetworkStateLoaded); } else { if (state == GST_STATE_PLAYING) { if (gst_element_set_state(gst_playbin_, GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) LOG(ERROR) << "GStreamer state change failed"; manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveCurrentData); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveCurrentData); manager()->OnNetworkStateChange( - GetPlayerId(), MediaPlayerTizen::NetworkStateLoading); + GetPlayerId(), MediaPlayerEfl::NetworkStateLoading); } } break; @@ -987,22 +987,22 @@ void MediaPlayerBridgeGstreamer::UpdateStates() { << gst_element_state_get_name(state) << " pending: " << gst_element_state_get_name(pending); - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); break; case GST_STATE_CHANGE_NO_PREROLL: if (state == GST_STATE_READY) { manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveNothing); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveNothing); } else if (state == GST_STATE_PAUSED) { manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveEnoughData); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveEnoughData); is_paused_ = true; is_live_stream_ = true; } else if (state == GST_STATE_PLAYING) { is_paused_ = false; } manager()->OnNetworkStateChange( - GetPlayerId(), MediaPlayerTizen::NetworkStateLoading); + GetPlayerId(), MediaPlayerEfl::NetworkStateLoading); break; default: LOG(ERROR) << "Unhandled return type: " << ret; @@ -1242,7 +1242,7 @@ void MediaPlayerBridgeGstreamer::PlatformSurfaceUpdated() { #endif void MediaPlayerBridgeGstreamer::HandleError( - media::MediaPlayerTizen::NetworkState state) { + media::MediaPlayerEfl::NetworkState state) { LOG(ERROR) << "Error in MediaPlayerBridgeGstreamer::HandleError"; #if defined(OS_TIZEN_MOBILE) && (defined(TIZEN_V_2_3) || defined(TIZEN_V_2_4)) if (device_power_release_lock(POWER_LOCK_DISPLAY) != DEVICE_ERROR_NONE) diff --git a/tizen_src/impl/media/base/tizen/media_player_bridge_gstreamer.h b/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.h similarity index 95% rename from tizen_src/impl/media/base/tizen/media_player_bridge_gstreamer.h rename to tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.h index 91bc7ab..64826b1 100644 --- a/tizen_src/impl/media/base/tizen/media_player_bridge_gstreamer.h +++ b/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.h @@ -19,7 +19,7 @@ #include "base/timer/timer.h" #include "content/public/browser/browser_message_filter.h" #include "media/base/ranges.h" -#include "media/base/tizen/media_player_tizen.h" +#include "media/base/efl/media_player_efl.h" #include "media/base/video_frame.h" #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) @@ -29,7 +29,7 @@ namespace media { class MEDIA_EXPORT MediaPlayerBridgeGstreamer - : public MediaPlayerTizen { + : public MediaPlayerEfl { public: MediaPlayerBridgeGstreamer( int player_id, @@ -38,7 +38,7 @@ class MEDIA_EXPORT MediaPlayerBridgeGstreamer MediaPlayerManager* manager); virtual ~MediaPlayerBridgeGstreamer(); - // MediaPlayerTizen implementation. + // MediaPlayerEfl implementation. virtual void Play() override; virtual void Pause(bool is_media_related_action) override; virtual void SetRate(double rate) override; @@ -48,7 +48,7 @@ class MEDIA_EXPORT MediaPlayerBridgeGstreamer virtual void Destroy() override; // Error handling API - void HandleError(media::MediaPlayerTizen::NetworkState state); + void HandleError(media::MediaPlayerEfl::NetworkState state); void HandleMessage(GstMessage* message); void HandlePluginInstallerResult(GstInstallPluginsReturn result); @@ -67,7 +67,7 @@ class MEDIA_EXPORT MediaPlayerBridgeGstreamer #endif protected: - virtual void Release(); + void Release() override; private: // |duration_update_timer_| related diff --git a/tizen_src/impl/media/base/tizen/media_player_tizen.h b/tizen_src/chromium_impl/media/base/efl/media_player_efl.h old mode 100755 new mode 100644 similarity index 90% rename from tizen_src/impl/media/base/tizen/media_player_tizen.h rename to tizen_src/chromium_impl/media/base/efl/media_player_efl.h index ce7c3ac..657b7be --- a/tizen_src/impl/media/base/tizen/media_player_tizen.h +++ b/tizen_src/chromium_impl/media/base/efl/media_player_efl.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/callback.h" #include "base/time/time.h" -#include "content/common/media/tizen/media_player_messages_enums_tizen.h" +#include "content/common/media/efl/media_player_messages_enums_efl.h" #include "media/base/media_export.h" #include "url/gurl.h" @@ -31,7 +31,7 @@ enum MediaErrorType { const int MEDIA_AUDIO_MASK = 0x02; const int MEDIA_VIDEO_MASK = 0x01; -class MEDIA_EXPORT MediaPlayerTizen{ +class MEDIA_EXPORT MediaPlayerEfl{ public: // FIXME: Remove these enum and use webkit's enum ReadyState { @@ -57,8 +57,8 @@ class MEDIA_EXPORT MediaPlayerTizen{ int64 end; } TimeRanges; - MediaPlayerTizen() { } - virtual ~MediaPlayerTizen() { } + MediaPlayerEfl() { } + virtual ~MediaPlayerEfl() { } // Start playing the media. virtual void Play() = 0; @@ -91,7 +91,7 @@ class MEDIA_EXPORT MediaPlayerTizen{ // Release the player resources. virtual void Release() = 0; - MediaPlayerTizen(int player_id, MediaPlayerManager* manager) + MediaPlayerEfl(int player_id, MediaPlayerManager* manager) : destructing_(false), player_id_(player_id), manager_(manager) { } MediaPlayerManager* manager() { return manager_; } @@ -105,7 +105,7 @@ class MEDIA_EXPORT MediaPlayerTizen{ // Resource manager for all the media players. MediaPlayerManager* manager_; - DISALLOW_COPY_AND_ASSIGN(MediaPlayerTizen); + DISALLOW_COPY_AND_ASSIGN(MediaPlayerEfl); }; } // namespace media diff --git a/tizen_src/impl/media/base/tizen/media_player_manager_tizen.h b/tizen_src/chromium_impl/media/base/efl/media_player_manager_efl.h similarity index 80% rename from tizen_src/impl/media/base/tizen/media_player_manager_tizen.h rename to tizen_src/chromium_impl/media/base/efl/media_player_manager_efl.h index 5370ec8..7102fee 100644 --- a/tizen_src/impl/media/base/tizen/media_player_manager_tizen.h +++ b/tizen_src/chromium_impl/media/base/efl/media_player_manager_efl.h @@ -8,16 +8,16 @@ #include #include "base/memory/shared_memory.h" -#include "media/base/tizen/media_player_tizen.h" +#include "media/base/efl/media_player_efl.h" namespace media { -class MediaPlayerTizen; +class MediaPlayerEfl; class MEDIA_EXPORT MediaPlayerManager { public: virtual ~MediaPlayerManager() { } - virtual MediaPlayerTizen* GetPlayer(int player_id) = 0; + virtual MediaPlayerEfl* GetPlayer(int player_id) = 0; virtual void OnTimeChanged(int player_id) = 0; virtual void OnTimeUpdate(int player_id, double current_time) = 0; @@ -26,13 +26,13 @@ class MEDIA_EXPORT MediaPlayerManager { virtual void OnSeekStateChange(int player_id, bool state) = 0; virtual void OnBufferUpdate( int player_id, - std::vector buffer_range) = 0; + std::vector buffer_range) = 0; virtual void OnDurationChange(int player_id, double duration) = 0; virtual void OnReadyStateChange(int player_id, - MediaPlayerTizen::ReadyState state) = 0; + MediaPlayerEfl::ReadyState state) = 0; virtual void OnNetworkStateChange( int player_id, - MediaPlayerTizen::NetworkState state) = 0; + MediaPlayerEfl::NetworkState state) = 0; virtual void OnMediaDataChange( int player_id, int format, @@ -54,4 +54,4 @@ class MEDIA_EXPORT MediaPlayerManager { } // namespace media -#endif // MEDIA_BASE_TIZEN_MEDIA_PLAYER_TIZEN_MANAGER_H_ \ No newline at end of file +#endif // MEDIA_BASE_TIZEN_MEDIA_PLAYER_TIZEN_MANAGER_H_ diff --git a/tizen_src/impl/media/base/tizen/media_source_player_gstreamer.cc b/tizen_src/chromium_impl/media/base/efl/media_source_player_gstreamer.cc similarity index 97% rename from tizen_src/impl/media/base/tizen/media_source_player_gstreamer.cc rename to tizen_src/chromium_impl/media/base/efl/media_source_player_gstreamer.cc index 0ee7f50..6bbfe30 100644 --- a/tizen_src/impl/media/base/tizen/media_source_player_gstreamer.cc +++ b/tizen_src/chromium_impl/media/base/efl/media_source_player_gstreamer.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "media/base/tizen/media_source_player_gstreamer.h" +#include "media/base/efl/media_source_player_gstreamer.h" #include #include #include #include "base/process/process.h" -#include "media/base/tizen/media_player_manager_tizen.h" +#include "media/base/efl/media_player_manager_efl.h" #if defined(OS_TIZEN_MOBILE) && (defined(TIZEN_V_2_3) || defined(TIZEN_V_2_4)) #include @@ -167,8 +167,8 @@ static int get_pixmap_id_cb(void* user_data) { static ASM_cb_result_t media_player_audio_session_event_source_pause( ASM_event_sources_t event_source, void* user_data) { - MediaPlayerTizen* player = - static_cast(user_data); + MediaPlayerEfl* player = + static_cast(user_data); if (!player) { return ASM_CB_RES_IGNORE; } @@ -191,8 +191,8 @@ static ASM_cb_result_t media_player_audio_session_event_source_pause( static ASM_cb_result_t media_player_audio_session_event_source_play( ASM_event_sources_t event_source, void* user_data) { - MediaPlayerTizen* player = - static_cast(user_data); + MediaPlayerEfl* player = + static_cast(user_data); if (!player) { return ASM_CB_RES_IGNORE; } @@ -331,9 +331,9 @@ std::string ConvertWidthAndHeightToString(int width, int height) { MediaSourcePlayerGstreamer::MediaSourcePlayerGstreamer( int player_id, - scoped_ptr demuxer, + scoped_ptr demuxer, MediaPlayerManager* manager) - : MediaPlayerTizen(player_id, manager), + : MediaPlayerEfl(player_id, manager), demuxer_(demuxer.Pass()), main_loop_(base::MessageLoopProxy::current()), #if defined(OS_TIZEN_TV) && !defined(TIZEN_V_3_0) @@ -558,7 +558,7 @@ void MediaSourcePlayerGstreamer::SeekInternal(const GstClockTime position) { static_cast(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), GST_SEEK_TYPE_SET, startTime, GST_SEEK_TYPE_SET, endTime)) { LOG(ERROR) << "Seek to " << position << " failed"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); } } @@ -653,7 +653,7 @@ void MediaSourcePlayerGstreamer::OnDemuxerConfigsAvailable( (configs.audio_codec != kCodecAAC && configs.audio_codec != kCodecMP3))) { LOG(ERROR) << "Audio and Video codecs not supported for MediaSource"; - HandleError(MediaPlayerTizen::NetworkStateFormatError); + HandleError(MediaPlayerEfl::NetworkStateFormatError); return; } @@ -674,7 +674,7 @@ void MediaSourcePlayerGstreamer::OnDemuxerConfigsAvailable( pipeline_ = gst_pipeline_new(kPipelineName); if (!pipeline_) { LOG(ERROR) << "Unable to Create |Pipeline|"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); return; } @@ -703,7 +703,7 @@ void MediaSourcePlayerGstreamer::OnDemuxerConfigsAvailable( !video_decoder_ || !video_sink_) { LOG(ERROR) << "Not all elements of video pipeline could be created"; ReleaseVideoElements(); - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); return; } @@ -780,7 +780,7 @@ void MediaSourcePlayerGstreamer::OnDemuxerConfigsAvailable( !audio_volume_ || !audio_sink_) { LOG(ERROR) << "Not all elements of audio pipeline could be created"; ReleaseAudioElements(); - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); return; } @@ -833,7 +833,7 @@ void MediaSourcePlayerGstreamer::OnDemuxerConfigsAvailable( GstBus*bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline_)); if (!bus) { LOG(ERROR) << "GStreamer bus creation failed"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); return; } #if GST_VERSION_MAJOR == 1 @@ -849,14 +849,14 @@ void MediaSourcePlayerGstreamer::OnDemuxerConfigsAvailable( gst_height_, gst_width_, media_type); manager()->OnReadyStateChange(GetPlayerId(), - MediaPlayerTizen::ReadyStateHaveMetadata); + MediaPlayerEfl::ReadyStateHaveMetadata); if (gst_element_set_state(pipeline_, GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) LOG(ERROR) << "GStreamer state change failed"; } else { LOG(ERROR) << "Unable to initialize GST"; - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); } } @@ -1611,17 +1611,17 @@ void MediaSourcePlayerGstreamer::HandleMessage(GstMessage* message) { case GST_MESSAGE_ERROR: GError* error; gst_message_parse_error(message, &error, NULL); - MediaPlayerTizen::NetworkState network_state_error; - network_state_error = MediaPlayerTizen::NetworkStateEmpty; + MediaPlayerEfl::NetworkState network_state_error; + network_state_error = MediaPlayerEfl::NetworkStateEmpty; if (error->code == GST_STREAM_ERROR_CODEC_NOT_FOUND || error->code == GST_STREAM_ERROR_WRONG_TYPE || error->code == GST_STREAM_ERROR_FAILED || error->code == GST_RESOURCE_ERROR_NOT_FOUND) { - network_state_error = MediaPlayerTizen::NetworkStateFormatError; + network_state_error = MediaPlayerEfl::NetworkStateFormatError; } else if (error->domain == GST_RESOURCE_ERROR) { - network_state_error = MediaPlayerTizen::NetworkStateNetworkError; + network_state_error = MediaPlayerEfl::NetworkStateNetworkError; } else { - network_state_error = MediaPlayerTizen::NetworkStateDecodeError; + network_state_error = MediaPlayerEfl::NetworkStateDecodeError; } #if defined(OS_TIZEN_TV) && !defined(TIZEN_V_3_0) if (!audio_session_manager_->SetSoundState(ASM_STATE_STOP)) @@ -1731,7 +1731,7 @@ void MediaSourcePlayerGstreamer::OnUpdateStates() { switch (state) { case GST_STATE_PAUSED: manager()->OnReadyStateChange( - GetPlayerId(), MediaPlayerTizen::ReadyStateHaveEnoughData); + GetPlayerId(), MediaPlayerEfl::ReadyStateHaveEnoughData); break; default: VLOG(1) << "GStreamer unhandled state " @@ -1744,7 +1744,7 @@ void MediaSourcePlayerGstreamer::OnUpdateStates() { << gst_element_state_get_name(state) << " pending: " << gst_element_state_get_name(pending); - HandleError(MediaPlayerTizen::NetworkStateDecodeError); + HandleError(MediaPlayerEfl::NetworkStateDecodeError); break; case GST_STATE_CHANGE_NO_PREROLL: @@ -1763,18 +1763,18 @@ void MediaSourcePlayerGstreamer::HandleBufferingMessage() { is_paused_due_underflow_ = true; Pause(true); manager()->OnReadyStateChange(GetPlayerId(), - MediaPlayerTizen::ReadyStateHaveCurrentData); + MediaPlayerEfl::ReadyStateHaveCurrentData); manager()->OnNetworkStateChange(GetPlayerId(), - MediaPlayerTizen::NetworkStateLoading); + MediaPlayerEfl::NetworkStateLoading); } else if (is_paused_due_underflow_ && (!HasAudio() || audio_buffered_ == 100) && (!HasVideo() || video_buffered_ == 100)) { is_paused_due_underflow_ = false; Play(); manager()->OnReadyStateChange(GetPlayerId(), - MediaPlayerTizen::ReadyStateHaveEnoughData); + MediaPlayerEfl::ReadyStateHaveEnoughData); manager()->OnNetworkStateChange(GetPlayerId(), - MediaPlayerTizen::NetworkStateLoaded); + MediaPlayerEfl::NetworkStateLoaded); } } @@ -1806,7 +1806,7 @@ void MediaSourcePlayerGstreamer::OnTimeChanged() { } void MediaSourcePlayerGstreamer::HandleError( - media::MediaPlayerTizen::NetworkState state) { + media::MediaPlayerEfl::NetworkState state) { error_occured_ = true; manager()->OnNetworkStateChange(GetPlayerId(), state); diff --git a/tizen_src/impl/media/base/tizen/media_source_player_gstreamer.h b/tizen_src/chromium_impl/media/base/efl/media_source_player_gstreamer.h similarity index 95% rename from tizen_src/impl/media/base/tizen/media_source_player_gstreamer.h rename to tizen_src/chromium_impl/media/base/efl/media_source_player_gstreamer.h index f507e17..af502b7 100644 --- a/tizen_src/impl/media/base/tizen/media_source_player_gstreamer.h +++ b/tizen_src/chromium_impl/media/base/efl/media_source_player_gstreamer.h @@ -16,8 +16,8 @@ #include "base/threading/thread.h" #include "base/time/default_tick_clock.h" #include "base/timer/timer.h" -#include "media/base/tizen/demuxer_tizen.h" -#include "media/base/tizen/media_player_tizen.h" +#include "media/base/efl/demuxer_efl.h" +#include "media/base/efl/media_player_efl.h" #include "media/base/decoder_buffer.h" #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) @@ -43,20 +43,20 @@ struct VideoCodecGstElementsMapping { namespace media { // This class handles media source extensions for Gstreamer port. -class MEDIA_EXPORT MediaSourcePlayerGstreamer : public MediaPlayerTizen, - public DemuxerTizenClient { +class MEDIA_EXPORT MediaSourcePlayerGstreamer : public MediaPlayerEfl, + public DemuxerEflClient { public: // Constructs a player with the given ID and demuxer. |manager| must outlive // the lifetime of this object. MediaSourcePlayerGstreamer( int player_id, - scoped_ptr demuxer, + scoped_ptr demuxer, MediaPlayerManager* manager); virtual ~MediaSourcePlayerGstreamer(); - // MediaPlayerTizen implementation. + // MediaPlayerEfl implementation. virtual void Play() override; virtual void Pause(bool is_media_related_action) override; virtual void SetRate(double rate) override; @@ -65,7 +65,7 @@ class MEDIA_EXPORT MediaSourcePlayerGstreamer : public MediaPlayerTizen, virtual double GetCurrentTime() override; virtual void Destroy() override; - // DemuxerTizenClient implementation. + // DemuxerEflClient implementation. virtual void OnDemuxerConfigsAvailable( const DemuxerConfigs& params) override; virtual void OnDemuxerDataAvailable( @@ -153,9 +153,9 @@ class MEDIA_EXPORT MediaSourcePlayerGstreamer : public MediaPlayerTizen, void OnTimeChanged(); // Error handling API - void HandleError(media::MediaPlayerTizen::NetworkState state); + void HandleError(media::MediaPlayerEfl::NetworkState state); - scoped_ptr demuxer_; + scoped_ptr demuxer_; const scoped_refptr main_loop_; diff --git a/tizen_src/impl/media/base/tizen/webaudio_media_codec_info_tizen.h b/tizen_src/chromium_impl/media/base/efl/webaudio_media_codec_info_efl.h similarity index 68% rename from tizen_src/impl/media/base/tizen/webaudio_media_codec_info_tizen.h rename to tizen_src/chromium_impl/media/base/efl/webaudio_media_codec_info_efl.h index 617de5e..b44c056 100644 --- a/tizen_src/impl/media/base/tizen/webaudio_media_codec_info_tizen.h +++ b/tizen_src/chromium_impl/media/base/efl/webaudio_media_codec_info_efl.h @@ -2,19 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef MEDIA_BASE_TIZEN_WEBAUDIO_MEDIA_CODEC_INFO_TIZEN_H_ -#define MEDIA_BASE_TIZEN_WEBAUDIO_MEDIA_CODEC_INFO_TIZEN_H_ +#ifndef MEDIA_BASE_TIZEN_WEBAUDIO_MEDIA_CODEC_INFO_EFL_H_ +#define MEDIA_BASE_TIZEN_WEBAUDIO_MEDIA_CODEC_INFO_EFL_H_ namespace media { // This structure holds the information about the audio file // determined by MediaCodec that is needed by the audio decoder to // create the necessary destination bus. -struct WebAudioMediaCodecInfoTizen { +struct WebAudioMediaCodecInfoEfl { unsigned long channel_count; unsigned long sample_rate; unsigned long number_of_frames; }; } // namespace media -#endif // MEDIA_BASE_TIZEN_WEBAUDIO_MEDIA_CODEC_INFO_TIZEN_H_ \ No newline at end of file +#endif // MEDIA_BASE_TIZEN_WEBAUDIO_MEDIA_CODEC_INFO_EFL_H_ diff --git a/tizen_src/impl/media/base/tizen/webmediaplayer_tizen.cc b/tizen_src/chromium_impl/media/base/efl/webmediaplayer_efl.cc similarity index 81% rename from tizen_src/impl/media/base/tizen/webmediaplayer_tizen.cc rename to tizen_src/chromium_impl/media/base/efl/webmediaplayer_efl.cc index a6faa8b..22769dd 100644 --- a/tizen_src/impl/media/base/tizen/webmediaplayer_tizen.cc +++ b/tizen_src/chromium_impl/media/base/efl/webmediaplayer_efl.cc @@ -2,23 +2,23 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "media/base/tizen/webmediaplayer_tizen.h" +#include "media/base/efl/webmediaplayer_efl.h" #include #include "cc/blink/web_layer_impl.h" #include "cc/layers/video_layer.h" +#include "content/common/wrt/wrt_url_parse.h" #include "content/renderer/media/render_media_log.h" #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_thread_impl.h" -#include "media/base/tizen/media_player_tizen.h" +#include "media/base/efl/media_player_efl.h" #include "media/base/bind_to_current_loop.h" #include "media/base/video_frame.h" #include "media/blink/webmediaplayer_util.h" #include "third_party/libyuv/include/libyuv/planar_functions.h" #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" -#include "wrt/wrt_url_parse.h" #define BIND_TO_RENDER_LOOP(function) \ (DCHECK(main_loop_->BelongsToCurrentThread()), \ @@ -48,8 +48,8 @@ GURL GetCleanURL(std::string url) { return url_; } -WebMediaPlayerTizen::WebMediaPlayerTizen( - content::RendererMediaPlayerManagerTizen* manager, +WebMediaPlayerEfl::WebMediaPlayerEfl( + content::RendererMediaPlayerManagerEfl* manager, blink::WebLocalFrame* frame, blink::WebMediaPlayerClient* client, base::WeakPtr delegate, @@ -68,8 +68,8 @@ WebMediaPlayerTizen::WebMediaPlayerTizen( compositor_task_runner_( content::RenderThreadImpl::current()->compositor_message_loop_proxy()), compositor_(new media::VideoFrameCompositor( - BIND_TO_RENDER_LOOP(&WebMediaPlayerTizen::OnNaturalSizeChanged), - BIND_TO_RENDER_LOOP(&WebMediaPlayerTizen::OnOpacityChanged))), + BIND_TO_RENDER_LOOP(&WebMediaPlayerEfl::OnNaturalSizeChanged), + BIND_TO_RENDER_LOOP(&WebMediaPlayerEfl::OnOpacityChanged))), weak_factory_(this), gst_video_format_(0), audio_(false), @@ -91,7 +91,7 @@ WebMediaPlayerTizen::WebMediaPlayerTizen( wrt_url_parse_(wrt_url_parse) { DCHECK(manager_); DCHECK(encrypted_media_support_); - VLOG(1) << "WebMediaPlayerTizen::" << __FUNCTION__; + VLOG(1) << "WebMediaPlayerEfl::" << __FUNCTION__; FrameAvailable_ = false; // We want to be notified of |main_loop_| destruction. base::MessageLoop::current()->AddDestructionObserver(this); @@ -106,8 +106,8 @@ WebMediaPlayerTizen::WebMediaPlayerTizen( media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); } -WebMediaPlayerTizen::~WebMediaPlayerTizen() { - VLOG(1) << "WebMediaPlayerTizen::" << __FUNCTION__; +WebMediaPlayerEfl::~WebMediaPlayerEfl() { + VLOG(1) << "WebMediaPlayerEfl::" << __FUNCTION__; if (manager_) { manager_->DestroyPlayer(player_id_); manager_->UnregisterMediaPlayer(player_id_); @@ -132,10 +132,10 @@ WebMediaPlayerTizen::~WebMediaPlayerTizen() { } } -void WebMediaPlayerTizen::load(LoadType load_type, +void WebMediaPlayerEfl::load(LoadType load_type, const blink::WebURL& url, CORSMode cors_mode) { - VLOG(1) << "WebMediaPlayerTizen::" << __FUNCTION__ << " load type - " + VLOG(1) << "WebMediaPlayerEfl::" << __FUNCTION__ << " load type - " << load_type; int demuxer_client_id = 0; if (load_type == LoadTypeMediaSource) { @@ -143,23 +143,23 @@ void WebMediaPlayerTizen::load(LoadType load_type, // Disabling MSE for desktop. #ifdef OS_TIZEN player_type_ = MEDIA_PLAYER_TYPE_MEDIA_SOURCE; - content::RendererDemuxerTizen* demuxer = + content::RendererDemuxerEfl* demuxer = content::RenderThreadImpl::current()->renderer_demuxer(); demuxer_client_id = demuxer->GetNextDemuxerClientID(); - media_source_delegate_.reset(new content::MediaSourceDelegateTizen( + media_source_delegate_.reset(new content::MediaSourceDelegateEfl( demuxer, demuxer_client_id, media_task_runner_, media_log_.get())); SetDecryptorReadyCB set_decryptor_ready_cb = encrypted_media_support_->CreateSetDecryptorReadyCB(); Demuxer::NeedKeyCB need_key_cb = encrypted_media_support_->CreateNeedKeyCB(); media_source_delegate_->InitializeMediaSource( - base::Bind(&WebMediaPlayerTizen::OnMediaSourceOpened, + base::Bind(&WebMediaPlayerEfl::OnMediaSourceOpened, weak_factory_.GetWeakPtr()), need_key_cb, set_decryptor_ready_cb, - base::Bind(&WebMediaPlayerTizen::SetNetworkState, + base::Bind(&WebMediaPlayerEfl::SetNetworkState, weak_factory_.GetWeakPtr()), - base::Bind(&WebMediaPlayerTizen::OnDurationChange, + base::Bind(&WebMediaPlayerEfl::OnDurationChange, weak_factory_.GetWeakPtr())); #else // Posting Error Message to HTMLMediaElement. @@ -187,7 +187,7 @@ void WebMediaPlayerTizen::load(LoadType load_type, } blink::WebMediaPlayer::MediaKeyException -WebMediaPlayerTizen::generateKeyRequest(const blink::WebString& key_system, +WebMediaPlayerEfl::generateKeyRequest(const blink::WebString& key_system, const unsigned char* init_data, unsigned init_data_length) { DCHECK(main_loop_->BelongsToCurrentThread()); @@ -196,7 +196,7 @@ WebMediaPlayerTizen::generateKeyRequest(const blink::WebString& key_system, frame_, key_system, init_data, init_data_length); } -blink::WebMediaPlayer::MediaKeyException WebMediaPlayerTizen::addKey( +blink::WebMediaPlayer::MediaKeyException WebMediaPlayerEfl::addKey( const blink::WebString& key_system, const unsigned char* key, unsigned key_length, @@ -209,7 +209,7 @@ blink::WebMediaPlayer::MediaKeyException WebMediaPlayerTizen::addKey( key_system, key, key_length, init_data, init_data_length, session_id); } -blink::WebMediaPlayer::MediaKeyException WebMediaPlayerTizen::cancelKeyRequest( +blink::WebMediaPlayer::MediaKeyException WebMediaPlayerEfl::cancelKeyRequest( const blink::WebString& key_system, const blink::WebString& session_id) { DCHECK(main_loop_->BelongsToCurrentThread()); @@ -217,14 +217,14 @@ blink::WebMediaPlayer::MediaKeyException WebMediaPlayerTizen::cancelKeyRequest( return encrypted_media_support_->CancelKeyRequest(key_system, session_id); } -void WebMediaPlayerTizen::setContentDecryptionModule( +void WebMediaPlayerEfl::setContentDecryptionModule( blink::WebContentDecryptionModule* cdm) { DCHECK(main_loop_->BelongsToCurrentThread()); encrypted_media_support_->SetContentDecryptionModule(cdm); } -void WebMediaPlayerTizen::setContentDecryptionModule( +void WebMediaPlayerEfl::setContentDecryptionModule( blink::WebContentDecryptionModule* cdm, blink::WebContentDecryptionModuleResult result) { DCHECK(main_loop_->BelongsToCurrentThread()); @@ -232,36 +232,36 @@ void WebMediaPlayerTizen::setContentDecryptionModule( encrypted_media_support_->SetContentDecryptionModule(cdm, result); } -void WebMediaPlayerTizen::OnMediaSourceOpened( +void WebMediaPlayerEfl::OnMediaSourceOpened( blink::WebMediaSource* web_media_source) { client_->mediaSourceOpened(web_media_source); } -void WebMediaPlayerTizen::play() { +void WebMediaPlayerEfl::play() { manager_->Play(player_id_); // Has to be updated from |MediaPlayerBridgeGstreamer| but IPC causes delay. // There are cases were play - pause are fired successively and would fail. is_paused_ = false; } -void WebMediaPlayerTizen::pause() { +void WebMediaPlayerEfl::pause() { manager_->Pause(player_id_, true); // Has to be updated from |MediaPlayerBridgeGstreamer| but IPC causes delay. // There are cases were play - pause are fired successively and would fail. is_paused_ = true; } -void WebMediaPlayerTizen::RequestPause() { +void WebMediaPlayerEfl::RequestPause() { pause(); client_->playbackStateChanged(); } -bool WebMediaPlayerTizen::supportsSave() const { +bool WebMediaPlayerEfl::supportsSave() const { return false; } -void WebMediaPlayerTizen::seek(double seconds) { - VLOG(1) << "WebMediaPlayerTizen::" << __FUNCTION__ << " : " << seconds +void WebMediaPlayerEfl::seek(double seconds) { + VLOG(1) << "WebMediaPlayerEfl::" << __FUNCTION__ << " : " << seconds << " ID " << player_id_; DCHECK(main_loop_->BelongsToCurrentThread()); @@ -309,20 +309,20 @@ void WebMediaPlayerTizen::seek(double seconds) { } } -void WebMediaPlayerTizen::setRate(double rate) { +void WebMediaPlayerEfl::setRate(double rate) { manager_->SetRate(player_id_, rate); } -void WebMediaPlayerTizen::setVolume(double volume) { +void WebMediaPlayerEfl::setVolume(double volume) { volume_ = volume; manager_->SetVolume(player_id_, volume); } -blink::WebTimeRanges WebMediaPlayerTizen::buffered() const{ +blink::WebTimeRanges WebMediaPlayerEfl::buffered() const{ return buffered_; } -blink::WebTimeRanges WebMediaPlayerTizen::seekable() const { +blink::WebTimeRanges WebMediaPlayerEfl::seekable() const { const double seekable_end = duration(); if (std::isinf(seekable_end)) return blink::WebTimeRanges(); @@ -331,7 +331,7 @@ blink::WebTimeRanges WebMediaPlayerTizen::seekable() const { return blink::WebTimeRanges(&seekable_range, 1); } -void WebMediaPlayerTizen::paint(blink::WebCanvas* canvas, +void WebMediaPlayerEfl::paint(blink::WebCanvas* canvas, const blink::WebRect& rect, unsigned char alpha, SkXfermode::Mode mode) { @@ -344,45 +344,45 @@ void WebMediaPlayerTizen::paint(blink::WebCanvas* canvas, SkXfermode::kSrcOver_Mode, media::VIDEO_ROTATION_0); } -bool WebMediaPlayerTizen::hasVideo() const { +bool WebMediaPlayerEfl::hasVideo() const { return video_; } -bool WebMediaPlayerTizen::hasAudio() const { +bool WebMediaPlayerEfl::hasAudio() const { return audio_; } -blink::WebSize WebMediaPlayerTizen::naturalSize() const { +blink::WebSize WebMediaPlayerEfl::naturalSize() const { return blink::WebSize(natural_size_); } -bool WebMediaPlayerTizen::paused() const { +bool WebMediaPlayerEfl::paused() const { return is_paused_; } -bool WebMediaPlayerTizen::seeking() const { +bool WebMediaPlayerEfl::seeking() const { return is_seeking_; } -double WebMediaPlayerTizen::duration() const { +double WebMediaPlayerEfl::duration() const { return duration_; } -double WebMediaPlayerTizen::currentTime() const { +double WebMediaPlayerEfl::currentTime() const { if (seeking()) return pending_seek_ ? pending_seek_time_ : seek_time_; return current_time_; } -blink::WebMediaPlayer::NetworkState WebMediaPlayerTizen::networkState() const { +blink::WebMediaPlayer::NetworkState WebMediaPlayerEfl::networkState() const { return network_state_; } -blink::WebMediaPlayer::ReadyState WebMediaPlayerTizen::readyState() const { +blink::WebMediaPlayer::ReadyState WebMediaPlayerEfl::readyState() const { return ready_state_; } -bool WebMediaPlayerTizen::didLoadingProgress() { +bool WebMediaPlayerEfl::didLoadingProgress() { if (did_loading_progress_) { did_loading_progress_ = false; return true; @@ -390,42 +390,58 @@ bool WebMediaPlayerTizen::didLoadingProgress() { return false; } -bool WebMediaPlayerTizen::hasSingleSecurityOrigin() const { +bool WebMediaPlayerEfl::hasSingleSecurityOrigin() const { return true; } -bool WebMediaPlayerTizen::didPassCORSAccessCheck() const { +bool WebMediaPlayerEfl::didPassCORSAccessCheck() const { return false; } -double WebMediaPlayerTizen::mediaTimeForTimeValue(double timeValue) const { +double WebMediaPlayerEfl::mediaTimeForTimeValue(double timeValue) const { return media::ConvertSecondsToTimestamp(timeValue).InSecondsF(); } -void WebMediaPlayerTizen::SetVideoFrameProviderClient( +unsigned WebMediaPlayerEfl::decodedFrameCount() const { + return 0; +}; + +unsigned WebMediaPlayerEfl::droppedFrameCount() const { + return 0; +}; + +unsigned WebMediaPlayerEfl::audioDecodedByteCount() const { + return 0; +}; + +unsigned WebMediaPlayerEfl::videoDecodedByteCount() const { + return 0; +}; + +void WebMediaPlayerEfl::SetVideoFrameProviderClient( cc::VideoFrameProvider::Client* client) { // This is called from both the main renderer thread and the compositor // thread (when the main thread is blocked). compositor_->SetVideoFrameProviderClient(client); } -scoped_refptrWebMediaPlayerTizen::GetCurrentFrame() { +scoped_refptrWebMediaPlayerEfl::GetCurrentFrame() { scoped_refptr current_frame = GetCurrentFrameFromCompositor(); return current_frame; } -void WebMediaPlayerTizen::SetReadyState(WebMediaPlayer::ReadyState state) { +void WebMediaPlayerEfl::SetReadyState(WebMediaPlayer::ReadyState state) { ready_state_ = state; client_->readyStateChanged(); } -void WebMediaPlayerTizen::SetNetworkState(WebMediaPlayer::NetworkState state) { +void WebMediaPlayerEfl::SetNetworkState(WebMediaPlayer::NetworkState state) { network_state_ = state; client_->networkStateChanged(); } -void WebMediaPlayerTizen::OnNewFrameAvailable(base::SharedMemoryHandle Handle, +void WebMediaPlayerEfl::OnNewFrameAvailable(base::SharedMemoryHandle Handle, uint32 yuv_size, base::TimeDelta timestamp) { base::SharedMemory shared_memory(Handle, false); @@ -530,7 +546,7 @@ void WebMediaPlayerTizen::OnNewFrameAvailable(base::SharedMemoryHandle Handle, break; } default: { - LOG(ERROR) << "WebMediaPlayerTizen::" << __FUNCTION__ + LOG(ERROR) << "WebMediaPlayerEfl::" << __FUNCTION__ << " not supported video format"; break; } @@ -543,7 +559,7 @@ void WebMediaPlayerTizen::OnNewFrameAvailable(base::SharedMemoryHandle Handle, #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT) // FIXME: Graphics team need to merge painting of Video-Frame on to 2d-canvas // from m34. -void WebMediaPlayerTizen::OnPlatformSurfaceUpdated( +void WebMediaPlayerEfl::OnPlatformSurfaceUpdated( int pixmap_id, base::TimeDelta timestamp) { gfx::Size size(gst_width_, gst_height_); @@ -554,7 +570,7 @@ void WebMediaPlayerTizen::OnPlatformSurfaceUpdated( } #endif -void WebMediaPlayerTizen::FrameReady( +void WebMediaPlayerEfl::FrameReady( const scoped_refptr& frame) { compositor_task_runner_->PostTask( FROM_HERE, @@ -562,7 +578,7 @@ void WebMediaPlayerTizen::FrameReady( base::Unretained(compositor_), frame)); } -void WebMediaPlayerTizen::OnMediaDataChange(int format, int height, int width, int media) { +void WebMediaPlayerEfl::OnMediaDataChange(int format, int height, int width, int media) { gst_video_format_ = static_cast(format); gst_height_ = height; gst_width_ = width; @@ -579,7 +595,7 @@ void WebMediaPlayerTizen::OnMediaDataChange(int format, int height, int width, i } } -void WebMediaPlayerTizen::OnTimeChanged() { +void WebMediaPlayerEfl::OnTimeChanged() { is_seeking_ = false; // Handling pending seek for ME. For MSE |CancelPendingSeek| @@ -592,15 +608,15 @@ void WebMediaPlayerTizen::OnTimeChanged() { client_->timeChanged(); } -void WebMediaPlayerTizen::OnDurationChange(double duration) { +void WebMediaPlayerEfl::OnDurationChange(double duration) { duration_ = duration; client_->durationChanged(); } -void WebMediaPlayerTizen::OnNaturalSizeChanged(gfx::Size size) { +void WebMediaPlayerEfl::OnNaturalSizeChanged(gfx::Size size) { DCHECK(main_loop_->BelongsToCurrentThread()); DCHECK_NE(ready_state_, WebMediaPlayer::ReadyStateHaveNothing); - TRACE_EVENT0("media", "WebMediaPlayerTizen::OnNaturalSizeChanged"); + TRACE_EVENT0("media", "WebMediaPlayerEfl::OnNaturalSizeChanged"); media_log_->AddEvent( media_log_->CreateVideoSizeSetEvent(size.width(), size.height())); natural_size_ = size; @@ -608,7 +624,7 @@ void WebMediaPlayerTizen::OnNaturalSizeChanged(gfx::Size size) { client_->sizeChanged(); } -void WebMediaPlayerTizen::OnOpacityChanged(bool opaque) { +void WebMediaPlayerEfl::OnOpacityChanged(bool opaque) { DCHECK(main_loop_->BelongsToCurrentThread()); DCHECK_NE(ready_state_, WebMediaPlayer::ReadyStateHaveNothing); @@ -627,7 +643,7 @@ static void GetCurrentFrameAndSignal( } scoped_refptr - WebMediaPlayerTizen::GetCurrentFrameFromCompositor() { + WebMediaPlayerEfl::GetCurrentFrameFromCompositor() { TRACE_EVENT0("media", "WebMediaPlayerImpl::GetCurrentFrameFromCompositor"); if (compositor_task_runner_->BelongsToCurrentThread()) @@ -646,14 +662,14 @@ scoped_refptr return video_frame; } -void WebMediaPlayerTizen::OnTimeUpdate(double current_time) { +void WebMediaPlayerEfl::OnTimeUpdate(double current_time) { current_time_ = current_time; } -void WebMediaPlayerTizen::OnBufferUpdate( - std::vector buffer_range) { +void WebMediaPlayerEfl::OnBufferUpdate( + std::vector buffer_range) { media::Ranges time_ranges; - std::vector::iterator tr_it; + std::vector::iterator tr_it; for ( tr_it = buffer_range.begin(); tr_it != buffer_range.end(); ++tr_it) { time_ranges.Add( base::TimeDelta::FromMicroseconds((*tr_it).start), @@ -664,8 +680,8 @@ void WebMediaPlayerTizen::OnBufferUpdate( did_loading_progress_ = true; } -void WebMediaPlayerTizen::OnPauseStateChange(bool state) { - VLOG(1) << "WebMediaPlayerTizen::" << __FUNCTION__ << " state:" << state; +void WebMediaPlayerEfl::OnPauseStateChange(bool state) { + VLOG(1) << "WebMediaPlayerEfl::" << __FUNCTION__ << " state:" << state; is_paused_ = state; if (delegate_.get()) { if(is_paused_) @@ -675,8 +691,8 @@ void WebMediaPlayerTizen::OnPauseStateChange(bool state) { } } -void WebMediaPlayerTizen::OnSeekStateChange(bool state) { - VLOG(1) << "WebMediaPlayerTizen::" << __FUNCTION__ << " state:" << state +void WebMediaPlayerEfl::OnSeekStateChange(bool state) { + VLOG(1) << "WebMediaPlayerEfl::" << __FUNCTION__ << " state:" << state << " ID " << player_id_; is_seeking_ = state; // Draw empty frame during seek. @@ -687,7 +703,7 @@ void WebMediaPlayerTizen::OnSeekStateChange(bool state) { } } -void WebMediaPlayerTizen::OnRequestSeek(double seek_time) { +void WebMediaPlayerEfl::OnRequestSeek(double seek_time) { client_->requestSeek(seek_time); } diff --git a/tizen_src/impl/media/base/tizen/webmediaplayer_tizen.h b/tizen_src/chromium_impl/media/base/efl/webmediaplayer_efl.h similarity index 68% rename from tizen_src/impl/media/base/tizen/webmediaplayer_tizen.h rename to tizen_src/chromium_impl/media/base/efl/webmediaplayer_efl.h index cb1a12a..d524d83 100644 --- a/tizen_src/impl/media/base/tizen/webmediaplayer_tizen.h +++ b/tizen_src/chromium_impl/media/base/efl/webmediaplayer_efl.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_MEDIA_TIZEN_WEBMEDIAPLAYER_TIZEN_H_ -#define CONTENT_RENDERER_MEDIA_TIZEN_WEBMEDIAPLAYER_TIZEN_H_ +#ifndef CONTENT_RENDERER_MEDIA_TIZEN_WEBMEDIAPLAYER_EFL_H_ +#define CONTENT_RENDERER_MEDIA_TIZEN_WEBMEDIAPLAYER_EFL_H_ #include "base/message_loop/message_loop.h" #include "cc/layers/video_frame_provider_client_impl.h" -#include "content/renderer/media/tizen/media_source_delegate_tizen.h" -#include "content/renderer/media/tizen/renderer_media_player_manager_tizen.h" +#include "content/renderer/media/efl/media_source_delegate_efl.h" +#include "content/renderer/media/efl/renderer_media_player_manager_efl.h" #include "media/blink/video_frame_compositor.h" #include "media/blink/webmediaplayer_params.h" #include "media/filters/skcanvas_video_renderer.h" @@ -22,7 +22,7 @@ class WebLayerImpl; } namespace content { -class RendererMediaPlayerManagerTizen; +class RendererMediaPlayerManagerEfl; class WrtUrlParseBase; } @@ -35,82 +35,82 @@ class WebMediaPlayerDelegate; // media player in the browser process. It listens to all the status changes // sent from the browser process and sends playback controls to the media // player. -class WebMediaPlayerTizen +class WebMediaPlayerEfl : public blink::WebMediaPlayer, public cc::VideoFrameProvider, public base::MessageLoop::DestructionObserver, - public base::SupportsWeakPtr { + public base::SupportsWeakPtr { public: - // Construct a WebMediaPlayerTizen object. This class communicates - // with the WebMediaPlayerTizen object in the browser process through + // Construct a WebMediaPlayerEfl object. This class communicates + // with the WebMediaPlayerEfl object in the browser process through // |proxy|. - WebMediaPlayerTizen( - content::RendererMediaPlayerManagerTizen* manager, + WebMediaPlayerEfl( + content::RendererMediaPlayerManagerEfl* manager, blink::WebLocalFrame* frame, blink::WebMediaPlayerClient* client, base::WeakPtr delegate, const WebMediaPlayerParams& params, content::WrtUrlParseBase* wrt_url_parse); - virtual ~WebMediaPlayerTizen(); + virtual ~WebMediaPlayerEfl(); // blink::WebMediaPlayer implementation. - virtual void load(LoadType load_type, - const blink::WebURL& url, - CORSMode cors_mode) override; + void load(LoadType load_type, + const blink::WebURL& url, + CORSMode cors_mode) override; // Playback controls. - virtual void play() override; - virtual void pause() override; - virtual bool supportsSave() const override; - virtual void seek(double seconds) override; - virtual void setRate(double) override; - virtual void setVolume(double) override; - virtual blink::WebTimeRanges buffered() const override; - virtual blink::WebTimeRanges seekable() const override; - - virtual void paint(blink::WebCanvas*, + void play() override; + void pause() override; + bool supportsSave() const override; + void seek(double seconds) override; + void setRate(double) override; + void setVolume(double) override; + blink::WebTimeRanges buffered() const override; + blink::WebTimeRanges seekable() const override; + + void paint(blink::WebCanvas*, const blink::WebRect&, unsigned char alpha, SkXfermode::Mode) override; // True if the loaded media has a playable video/audio track. - virtual bool hasVideo() const override; - virtual bool hasAudio() const override; + bool hasVideo() const override; + bool hasAudio() const override; // Dimension of the video. - virtual blink::WebSize naturalSize() const override; + blink::WebSize naturalSize() const override; // Getters of playback state. - virtual bool paused() const override; - virtual bool seeking() const override; - virtual double duration() const override; - virtual double currentTime() const override; + bool paused() const override; + bool seeking() const override; + double duration() const override; + double currentTime() const override; // Internal states of loading and network. - virtual NetworkState networkState() const override; - virtual ReadyState readyState() const override; + NetworkState networkState() const override; + ReadyState readyState() const override; - virtual bool didLoadingProgress() override; + bool didLoadingProgress() override; - virtual bool hasSingleSecurityOrigin() const override; - virtual bool didPassCORSAccessCheck() const override; + bool hasSingleSecurityOrigin() const override; + bool didPassCORSAccessCheck() const override; - virtual double mediaTimeForTimeValue(double timeValue) const override; + double mediaTimeForTimeValue(double timeValue) const override; - virtual unsigned decodedFrameCount() const override { return 0;}; - virtual unsigned droppedFrameCount() const override{ return 0;};; - virtual unsigned audioDecodedByteCount() const override{ return 0;};; - virtual unsigned videoDecodedByteCount() const override{ return 0;};; + unsigned decodedFrameCount() const override; + unsigned droppedFrameCount() const override; + unsigned audioDecodedByteCount() const override; + unsigned videoDecodedByteCount() const override; // cc::VideoFrameProvider implementation. - virtual void SetVideoFrameProviderClient( + void SetVideoFrameProviderClient( cc::VideoFrameProvider::Client* client) override; - virtual scoped_refptr GetCurrentFrame() override; - virtual void PutCurrentFrame( + scoped_refptr GetCurrentFrame() override; + void PutCurrentFrame( const scoped_refptr& frame) override {}; // Method inherited from DestructionObserver. - virtual void WillDestroyCurrentMessageLoop() override {}; + void WillDestroyCurrentMessageLoop() override {}; virtual MediaKeyException generateKeyRequest( const blink::WebString& key_system, @@ -150,7 +150,7 @@ class WebMediaPlayerTizen void OnDurationChange(double duration); void OnTimeUpdate(double current_time); void OnBufferUpdate( - std::vector buffer_range); + std::vector buffer_range); void OnTimeChanged(); void OnPauseStateChange(bool state); void OnSeekStateChange(bool state); @@ -159,7 +159,7 @@ class WebMediaPlayerTizen void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); void OnDemuxerSeekDone(); - void RequestPause(); + void RequestPause(); private: void OnNaturalSizeChanged(gfx::Size size); @@ -184,7 +184,7 @@ class WebMediaPlayerTizen // Manager for managing this object and for delegating method calls on // Render Thread. - content::RendererMediaPlayerManagerTizen* manager_; + content::RendererMediaPlayerManagerEfl* manager_; blink::WebMediaPlayerClient* client_; @@ -202,8 +202,8 @@ class WebMediaPlayerTizen media::VideoFrameCompositor* compositor_; media::SkCanvasVideoRenderer skcanvas_video_renderer_; - base::WeakPtrFactory weak_factory_; - scoped_ptr media_source_delegate_; + base::WeakPtrFactory weak_factory_; + scoped_ptr media_source_delegate_; MediaPlayerHostMsg_Initialize_Type player_type_; // Player ID assigned by the |manager_|. @@ -239,9 +239,9 @@ class WebMediaPlayerTizen scoped_ptr encrypted_media_support_; content::WrtUrlParseBase* wrt_url_parse_; - DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerTizen); + DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerEfl); }; } // namespace media -#endif // CONTENT_RENDERER_MEDIA_TIZEN_WEBMEDIAPLAYER_TIZEN_H_ +#endif // CONTENT_RENDERER_MEDIA_TIZEN_WEBMEDIAPLAYER_EFL_H_ diff --git a/tizen_src/impl/media/base/tizen/media_player_bridge_capi.cc b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc old mode 100755 new mode 100644 similarity index 100% rename from tizen_src/impl/media/base/tizen/media_player_bridge_capi.cc rename to tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc diff --git a/tizen_src/impl/media/base/tizen/media_player_bridge_capi.h b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h old mode 100755 new mode 100644 similarity index 100% rename from tizen_src/impl/media/base/tizen/media_player_bridge_capi.h rename to tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h diff --git a/tizen_src/chromium_impl/media/media_efl.gypi b/tizen_src/chromium_impl/media/media_efl.gypi new file mode 100644 index 0000000..280604d --- /dev/null +++ b/tizen_src/chromium_impl/media/media_efl.gypi @@ -0,0 +1,86 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'external_media_deps': [ + '<(DEPTH)/tizen_src/build/system.gyp:ecore', + '<(DEPTH)/tizen_src/build/system.gyp:ecore-x', + '<(DEPTH)/tizen_src/build/system.gyp:gstreamer', + ], + }, + + 'target_defaults': { + 'target_conditions': [ + + ['_target_name=="media"', { + 'include_dirs': [ + '<(DEPTH)/third_party/WebKit', + '<(DEPTH)/v8/include', + ], + 'sources': [ + 'base/efl/webaudio_media_codec_info_efl.h', + 'base/efl/demuxer_stream_player_params_efl.cc', + 'base/efl/demuxer_stream_player_params_efl.h', + 'base/efl/demuxer_efl.h', + 'base/efl/media_player_efl.h', + 'base/efl/media_player_bridge_gstreamer.cc', + 'base/efl/media_player_bridge_gstreamer.h', + 'base/efl/media_player_manager_efl.h', + 'base/efl/media_source_player_gstreamer.cc', + 'base/efl/media_source_player_gstreamer.h', + 'base/efl/webmediaplayer_efl.cc', + 'base/efl/webmediaplayer_efl.h', # ME and MSE + ], + + 'conditions': [ + + ['building_for_tizen_mobile==1', { + 'defines': [ + 'TIZEN_VIDEO_CAPTURE_SUPPORT=1', + ], + 'sources/': [ + [ 'exclude', 'video/capture/linux/video_capture_device_factory_linux.cc$' ], + [ 'exclude', 'video/capture/linux/video_capture_device_factory_linux.h$' ], + [ 'exclude', 'video/capture/linux/video_capture_device_linux.h$' ], + [ 'exclude', 'video/capture/linux/video_capture_device_linux.cc$' ], + ], + 'sources': [ + 'video/capture/tizen/video_capture_device_tizen.cc', + 'video/capture/tizen/video_capture_device_tizen.h', + 'video/capture/tizen/video_capture_device_factory_tizen.cc', + 'video/capture/tizen/video_capture_device_factory_tizen.h', + 'video/capture/tizen/video_capture_device_factory_tizen_helper.cc', + ], + }], + + ['building_for_tizen_tv==1 and chromium_efl_tizen_version!="3.0"', { + 'sources': [ + 'audio/tizen/audio_session_manager.h', + 'audio/tizen/audio_session_manager.cc', # ASM + ], + }], + + ['tizen_multimedia_use_capi_for_me==1', { + 'defines': [ + 'TIZEN_CAPI_PLAYER_SUPPORT=1', + ], + 'sources': [ + 'base/tizen/media_player_bridge_capi.cc', + 'base/tizen/media_player_bridge_capi.h', # ME with CAPI-MEDIA-PLAYER + ], + # Exclude the sources that depend on CAPI-MEDIA-PLAYER + 'sources!': [ + 'base/efl/media_player_bridge_gstreamer.cc', + 'base/efl/media_player_bridge_gstreamer.h', # ME with Gstreamer + ], + }], + + ], # conditions + + }], # _target_name=="media" + + ], # target_conditions + }, # target_defaults +} diff --git a/tizen_src/impl/media/video/capture/tizen/video_capture_device_factory_tizen.cc b/tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_factory_tizen.cc similarity index 100% rename from tizen_src/impl/media/video/capture/tizen/video_capture_device_factory_tizen.cc rename to tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_factory_tizen.cc diff --git a/tizen_src/impl/media/video/capture/tizen/video_capture_device_factory_tizen.h b/tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_factory_tizen.h similarity index 100% rename from tizen_src/impl/media/video/capture/tizen/video_capture_device_factory_tizen.h rename to tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_factory_tizen.h diff --git a/tizen_src/impl/media/video/capture/tizen/video_capture_device_factory_tizen_helper.cc b/tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_factory_tizen_helper.cc similarity index 100% rename from tizen_src/impl/media/video/capture/tizen/video_capture_device_factory_tizen_helper.cc rename to tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_factory_tizen_helper.cc diff --git a/tizen_src/impl/media/video/capture/tizen/video_capture_device_tizen.cc b/tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_tizen.cc similarity index 100% rename from tizen_src/impl/media/video/capture/tizen/video_capture_device_tizen.cc rename to tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_tizen.cc diff --git a/tizen_src/impl/media/video/capture/tizen/video_capture_device_tizen.h b/tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_tizen.h similarity index 100% rename from tizen_src/impl/media/video/capture/tizen/video_capture_device_tizen.h rename to tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_tizen.h diff --git a/tizen_src/supplement.gypi b/tizen_src/supplement.gypi index 563e27a..7de3d1f 100644 --- a/tizen_src/supplement.gypi +++ b/tizen_src/supplement.gypi @@ -10,6 +10,8 @@ 'building_for_tizen%': 0, 'building_for_tizen_mobile%': 0, 'building_for_tizen_tv%': 0, + 'tizen_multimedia_support%': 1, + 'tizen_multimedia_use_capi_for_me%': 0, 'data_dir%' : '/usr/share/chromium-efl/', 'exe_dir%' : '/usr/lib/chromium-efl/', @@ -37,7 +39,20 @@ ], 'target_defaults': { + + 'include_dirs': [ + '.', + # Mobile gcc 4.6.x hack begin + '<(DEPTH)/tizen_src/gcc46_compat_wrappers', + # Mobile gcc 4.6.x hack end + ], + + 'defines': [ + 'EWK_BRINGUP=1', + ], + 'conditions': [ + ['use_efl==1', { 'defines': [ 'USE_EFL=1', @@ -46,6 +61,7 @@ '<(DEPTH)/tizen_src/chromium_impl', ], }], + # Mobile gcc 4.6.x hack begin ['gcc_4_6_x==1', { 'defines': [ @@ -56,11 +72,13 @@ 'cflags_cc': [ '-std=gnu++0x', '-fpermissive' ], }], # Mobile gcc 4.6.x hack end + ['prebuilt_ld_gold_dir!=""', { 'ldflags': [ '-B<(prebuilt_ld_gold_dir)', ] }], + ['gcc_version >= 49', { 'ldflags': [ # In GCC 4.9, the linker (either bfd or gold) is called with the -plugin argument @@ -72,6 +90,13 @@ '-fno-use-linker-plugin', ], }], + + ['tizen_multimedia_support==1', { + 'defines': [ + 'TIZEN_MULTIMEDIA_SUPPORT=1', + ], + }], + ['building_for_tizen==1', { 'defines': [ 'OS_TIZEN=1', @@ -103,6 +128,7 @@ }], ], }], + ['building_for_tizen_mobile==1', { 'defines': [ 'OS_TIZEN_MOBILE=1', @@ -110,18 +136,22 @@ 'TIZEN_ENABLE_CAPI_SUPPORT=1', ], }], + ['building_for_tizen_tv==1', { 'defines': [ 'OS_TIZEN_TV=1', ], + 'conditions': [ + ['chromium_efl_tizen_version=="2.2.1"', { + 'defines': [ + 'TIZEN_MULTIMEDIA_PIXMAP_SUPPORT=1', + ], + }], + ], }], - ], - 'include_dirs': [ - '.', - # Mobile gcc 4.6.x hack begin - '<(DEPTH)/tizen_src/gcc46_compat_wrappers', - # Mobile gcc 4.6.x hack end - ], + + ], # conditions + # Mobile gcc 4.6.x hack begin 'target_conditions': [ ['_target_name=="boringssl" or _target_name=="crypto" or _target_name=="genperf" or _target_name=="yasm" or _target_name=="speech_proto" or _target_name=="skia_library" or _target_name=="http_server" or _target_name=="libjingle" or _target_name=="libjingle_webrtc_common" or _target_name=="content_renderer" or _target_name=="mesa_libglslcommon"', { @@ -142,5 +172,6 @@ }], ], # Mobile gcc 4.6.x hack end - }, #target_defaults + + }, # target_defaults }