20
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: CSConVideoParser header file
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef SCONVIDEOPARSER_H
|
|
20 |
#define SCONVIDEOPARSER_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32std.h>
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <videoplayer.h>
|
|
26 |
#include <TNEVideoClipInfo.h>
|
|
27 |
#include "cscontimeout.h"
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class CVideoOperationObserver;
|
|
31 |
class CVideoPlayerUtility;
|
|
32 |
|
|
33 |
// CLASS DECLARATION
|
|
34 |
|
|
35 |
//============================================================
|
|
36 |
// Class CSConVideoParser declaration
|
|
37 |
//============================================================
|
|
38 |
NONSHARABLE_CLASS( CSConVideoParser ) : public CBase,
|
|
39 |
public MVideoPlayerUtilityObserver,
|
|
40 |
public MTNEVideoClipInfoObserver,
|
|
41 |
public MTNEVideoClipThumbObserver,
|
|
42 |
private MTimeOutObserver
|
|
43 |
{
|
|
44 |
public: // Constructors and destructor
|
|
45 |
|
|
46 |
~CSConVideoParser();
|
|
47 |
static CSConVideoParser* NewLC();
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Opens file
|
|
51 |
* @return none
|
|
52 |
*/
|
|
53 |
void OpenFileL( const RFs& aFs, const TDesC& aFilename );
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Get video thumbnail
|
|
57 |
* @return video thumbnail in jpeg format,
|
|
58 |
* return KNullDesC8 if thumbain could not found
|
|
59 |
*/
|
|
60 |
const TDesC8& Thumbnail() const;
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Get video frame rate
|
|
64 |
* @return video frame rate frames/sec
|
|
65 |
*/
|
|
66 |
TReal32 VideoFrameRateL() const;
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Get video frame size
|
|
70 |
* @return none
|
|
71 |
*/
|
|
72 |
void VideoFrameSizeL(TSize& aSize) const;
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Get video format
|
|
76 |
* @return video format mimetype (example: video/mp4v-es)
|
|
77 |
*/
|
|
78 |
const TDesC8& VideoFormatMimeTypeL() const;
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Get videostream bitrate
|
|
82 |
* @return video bitrate bits/sec
|
|
83 |
*/
|
|
84 |
TInt VideoBitRateL() const;
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Get audiostream bitrate
|
|
88 |
* @return audio bitrate bits/sec
|
|
89 |
*/
|
|
90 |
TInt AudioBitRateL() const;
|
|
91 |
|
|
92 |
/**
|
|
93 |
* Get video duration
|
|
94 |
* @return video duration in milliseconds.
|
|
95 |
*/
|
|
96 |
TInt DurationL() const;
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Get videostream bitrate
|
|
100 |
* @return videostream mimetype
|
|
101 |
*/
|
|
102 |
const TDesC& VideoMimeTypeL();
|
|
103 |
|
|
104 |
/**
|
|
105 |
* Get audiostream mimetype
|
|
106 |
* @return audiostream mimetype
|
|
107 |
*/
|
|
108 |
const TDesC& AudioMimeTypeL();
|
|
109 |
|
|
110 |
protected: // from base classes
|
|
111 |
/** @see MVideoPlayerUtilityObserver::MvpuoOpenComplete */
|
|
112 |
void MvpuoOpenComplete(TInt aError);
|
|
113 |
|
|
114 |
/** @see MVideoPlayerUtilityObserver::MvpuoPrepareComplete */
|
|
115 |
void MvpuoPrepareComplete(TInt aError);
|
|
116 |
|
|
117 |
/** @see MVideoPlayerUtilityObserver::MvpuoFrameReady */
|
|
118 |
void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
|
|
119 |
|
|
120 |
/** @see MVideoPlayerUtilityObserver::MvpuoPlayComplete */
|
|
121 |
void MvpuoPlayComplete(TInt aError);
|
|
122 |
|
|
123 |
/** @see MVideoPlayerUtilityObserver::MvpuoEvent */
|
|
124 |
void MvpuoEvent(const TMMFEvent& aEvent);
|
|
125 |
|
|
126 |
/** @see MTNEVideoClipInfoObserver::NotifyVideoClipInfoReady */
|
|
127 |
void NotifyVideoClipInfoReady(CTNEVideoClipInfo& aInfo, TInt aError);
|
|
128 |
|
|
129 |
void NotifyVideoClipThumbCompleted(CTNEVideoClipInfo& aInfo,
|
|
130 |
TInt aError,
|
|
131 |
CFbsBitmap* aThumb);
|
|
132 |
|
|
133 |
/** @see MTimeOutObserver::TimeOut */
|
|
134 |
void TimeOut();
|
|
135 |
|
|
136 |
private:
|
|
137 |
|
|
138 |
CSConVideoParser();
|
|
139 |
void ConstructL();
|
|
140 |
|
|
141 |
private: // data
|
|
142 |
CVideoPlayerUtility* iVideoUtil;
|
|
143 |
CTNEVideoClipInfo* iVideoClip;
|
|
144 |
|
|
145 |
RWsSession iWsSession;
|
|
146 |
CWsScreenDevice* iScreen;
|
|
147 |
RWindow* iWindow;
|
|
148 |
RWindowGroup iRootWindow;
|
|
149 |
|
|
150 |
TRequestStatus* iCallerStatus;
|
|
151 |
CActiveSchedulerWait iWait;
|
|
152 |
CSconTimeOut* iTimeOut;
|
|
153 |
|
|
154 |
HBufC8* iThumbnail;
|
|
155 |
HBufC* iVideoMimeType;
|
|
156 |
HBufC* iAudioMimeType;
|
|
157 |
|
|
158 |
TBool iVideoUtilReady;
|
|
159 |
TBool iVideoClipReady;
|
|
160 |
TInt iVideoUtilErr;
|
|
161 |
TInt iVideoClipErr;
|
|
162 |
TBool iAsyncStopCalled;
|
|
163 |
};
|
|
164 |
|
|
165 |
#endif // SCONVIDEOPARSER_H
|
|
166 |
|