2
* Copyright (C) 2011 Apple Inc. All rights reserved.
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
7
* 1. Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* 2. Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
13
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
#ifndef MediaPlayerPrivateAVFoundationCF_h
27
#define MediaPlayerPrivateAVFoundationCF_h
29
#if PLATFORM(WIN) && ENABLE(VIDEO) && USE(AVFOUNDATION)
31
#include "MediaPlayerPrivateAVFoundation.h"
37
class MediaPlayerPrivateAVFoundationCF : public MediaPlayerPrivateAVFoundation {
39
virtual ~MediaPlayerPrivateAVFoundationCF();
41
static void registerMediaEngine(MediaEngineRegistrar);
44
MediaPlayerPrivateAVFoundationCF(MediaPlayer*);
47
static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
48
static void getSupportedTypes(HashSet<String>& types);
49
static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
50
static bool isAvailable();
52
virtual void cancelLoad();
54
virtual PlatformMedia platformMedia() const;
56
virtual void platformSetVisible(bool);
57
virtual void platformPlay();
58
virtual void platformPause();
59
virtual float currentTime() const;
60
virtual void setVolume(float);
61
virtual void setClosedCaptionsVisible(bool);
62
virtual void paint(GraphicsContext*, const IntRect&);
63
virtual void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
64
virtual PlatformLayer* platformLayer() const;
65
virtual bool supportsAcceleratedRendering() const { return true; }
66
virtual float mediaTimeForTimeValue(float) const;
68
virtual void createAVPlayer();
69
virtual void createAVPlayerItem();
70
virtual void createAVAssetForURL(const String& url);
71
virtual MediaPlayerPrivateAVFoundation::ItemStatus playerItemStatus() const;
72
virtual MediaPlayerPrivateAVFoundation::AssetStatus assetStatus() const;
74
virtual void checkPlayability();
75
virtual void updateRate();
76
virtual float rate() const;
77
virtual void seekToTime(float time);
78
virtual unsigned totalBytes() const;
79
virtual PassRefPtr<TimeRanges> platformBufferedTimeRanges() const;
80
virtual float platformMaxTimeSeekable() const;
81
virtual float platformDuration() const;
82
virtual float platformMaxTimeLoaded() const;
83
virtual void beginLoadingMetadata();
84
virtual void tracksChanged();
85
virtual void sizeChanged();
87
virtual bool hasAvailableVideoFrame() const;
89
virtual void createContextVideoRenderer();
90
virtual void destroyContextVideoRenderer();
92
virtual void createVideoLayer();
93
virtual void destroyVideoLayer();
95
virtual bool hasContextRenderer() const;
96
virtual bool hasLayerRenderer() const;
98
virtual void contentsNeedsDisplay();
100
friend class AVFWrapper;
101
AVFWrapper* m_avfWrapper;
103
bool m_videoFrameHasDrawn;
108
#endif // PLATFORM(WIN) && ENABLE(VIDEO) && USE(AVFOUNDATION)
109
#endif // MediaPlayerPrivateAVFoundationCF_h