~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
 
3
 *
 
4
 * Redistribution and use in source and binary forms, with or without
 
5
 * modification, are permitted provided that the following conditions
 
6
 * are met:
 
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.
 
12
 *
 
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. 
 
24
 */
 
25
 
 
26
#ifndef MediaPlayerPrivateAVFoundationCF_h
 
27
#define MediaPlayerPrivateAVFoundationCF_h
 
28
 
 
29
#if PLATFORM(WIN) && ENABLE(VIDEO) && USE(AVFOUNDATION)
 
30
 
 
31
#include "MediaPlayerPrivateAVFoundation.h"
 
32
 
 
33
namespace WebCore {
 
34
 
 
35
class AVFWrapper;
 
36
 
 
37
class MediaPlayerPrivateAVFoundationCF : public MediaPlayerPrivateAVFoundation {
 
38
public:
 
39
    virtual ~MediaPlayerPrivateAVFoundationCF();
 
40
 
 
41
    static void registerMediaEngine(MediaEngineRegistrar);
 
42
 
 
43
private:
 
44
    MediaPlayerPrivateAVFoundationCF(MediaPlayer*);
 
45
 
 
46
    // Engine support
 
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();
 
51
 
 
52
    virtual void cancelLoad();
 
53
 
 
54
    virtual PlatformMedia platformMedia() const;
 
55
 
 
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;
 
67
 
 
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;
 
73
 
 
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();
 
86
 
 
87
    virtual bool hasAvailableVideoFrame() const;
 
88
 
 
89
    virtual void createContextVideoRenderer();
 
90
    virtual void destroyContextVideoRenderer();
 
91
 
 
92
    virtual void createVideoLayer();
 
93
    virtual void destroyVideoLayer();
 
94
 
 
95
    virtual bool hasContextRenderer() const;
 
96
    virtual bool hasLayerRenderer() const;
 
97
 
 
98
    virtual void contentsNeedsDisplay();
 
99
 
 
100
    friend class AVFWrapper;
 
101
    AVFWrapper* m_avfWrapper;
 
102
    
 
103
    bool m_videoFrameHasDrawn;
 
104
};
 
105
 
 
106
}
 
107
 
 
108
#endif // PLATFORM(WIN) && ENABLE(VIDEO) && USE(AVFOUNDATION)
 
109
#endif // MediaPlayerPrivateAVFoundationCF_h