1 // Copyright 2014 Samsung Electronics Inc. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_TIZEN_DEMUXER_EFL_H_
6 #define MEDIA_BASE_TIZEN_DEMUXER_EFL_H_
8 #include "base/memory/shared_memory_handle.h"
9 #include "media/base/tizen/demuxer_stream_player_params_efl.h"
13 // Defines the client callback interface.
14 class MEDIA_EXPORT DemuxerEflClient {
16 // Called when the demuxer has initialized.
17 virtual void OnDemuxerConfigsAvailable(const DemuxerConfigs& params) = 0;
19 #if defined(OS_TIZEN_TV_PRODUCT)
20 // Called when the demuxer state changed.
21 virtual void OnDemuxerStateChanged(const DemuxerConfigs& params) = 0;
24 // Called in response to RequestDemuxerData().
25 virtual void OnDemuxerDataAvailable(
26 base::SharedMemoryHandle foreign_memory_handle,
27 const media::DemuxedBufferMetaData& meta_data) = 0;
29 // Called to inform demuxer seek completion.
30 virtual void OnDemuxerSeekDone(
31 const base::TimeDelta& actual_browser_seek_time) = 0;
33 // Called whenever the demuxer has detected a duration change.
34 virtual void OnDemuxerDurationChanged(base::TimeDelta duration) = 0;
37 virtual ~DemuxerEflClient() {}
40 // Defines a demuxer with asynchronous operations.
41 class MEDIA_EXPORT DemuxerEfl {
43 virtual ~DemuxerEfl() {}
45 // Initializes this demuxer with |client| as the callback handler.
46 // Must be called prior to calling any other methods.
47 virtual void Initialize(DemuxerEflClient* client) = 0;
49 // Called to request demuxer seek.
50 virtual void RequestDemuxerSeek(const base::TimeDelta& time_to_seek) = 0;
52 // Called to request additional data from the demuxer.
53 virtual void RequestDemuxerData(media::DemuxerStream::Type type) = 0;
58 #endif // MEDIA_BASE_TIZEN_DEMUXER_EFL_H_