• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /**
19  * @file pvmp4ffcn_node.h
20  * @brief PVMF node for PVMp4FFComposer
21  */
22 
23 #ifndef PVMP4FFCN_NODE_H_INCLUDED
24 #define PVMP4FFCN_NODE_H_INCLUDED
25 
26 #ifndef OSCL_BASE_H_INCLUDED
27 #include "oscl_base.h"
28 #endif
29 #ifndef OSCLCONFIG_IO_H_INCLUDED
30 #include "osclconfig_io.h"
31 #endif
32 #ifndef OSCL_FILE_IO_H_INCLUDED
33 #include "oscl_file_io.h"
34 #endif
35 #ifndef OSCL_SCHEDULER_AO_H_INCLUDED
36 #include "oscl_scheduler_ao.h"
37 #endif
38 #ifndef PVLOGGER_H_INCLUDED
39 #include "pvlogger.h"
40 #endif
41 #ifndef __A_IMpeg4File_H__
42 #include "a_impeg4file.h"
43 #endif
44 #ifndef __MEDIA_CLOCK_CONVERTER_H
45 #include "media_clock_converter.h"
46 #endif
47 #ifndef PVMF_FORMAT_TYPE_H_INCLUDED
48 #include "pvmf_format_type.h"
49 #endif
50 #ifndef PVMF_SIMPLE_MEDIA_BUFFER_H_INCLUDED
51 #include "pvmf_simple_media_buffer.h"
52 #endif
53 #ifndef PVMF_MEDIA_DATA_H_INCLUDED
54 #include "pvmf_media_data.h"
55 #endif
56 #ifndef PVMF_NODE_INTERFACE_H_INCLUDED
57 #include "pvmf_node_interface.h"
58 #endif
59 #ifndef PVMF_NODE_UTILS_H_INCLUDED
60 #include "pvmf_node_utils.h"
61 #endif
62 #ifndef PVMP4FFCN_TYPES_H_INCLUDED
63 #include "pvmp4ffcn_types.h"
64 #endif
65 #ifndef PVMP4FFCN_TUNABLES_H_INCLUDED
66 #include "pvmp4ffcn_tunables.h"
67 #endif
68 #ifndef PVMP4FFCN_CLIPCONFIG_H_INCLUDED
69 #include "pvmp4ffcn_clipconfig.h"
70 #endif
71 #ifndef PVMP4FFCN_TRACKCONFIG_H_INCLUDED
72 #include "pvmp4ffcn_trackconfig.h"
73 #endif
74 #ifndef PVMF_COMPOSER_SIZE_AND_DURATION_H_INCLUDED
75 #include "pvmf_composer_size_and_duration.h"
76 #endif
77 
78 #ifndef PVMI_CONFIG_AND_CAPABILITY_H_INCLUDED
79 #include "pvmi_config_and_capability.h"
80 #endif
81 #ifndef PVMF_MEDIA_MSG_FORMAT_IDS_H_INCLUDED
82 #include "pvmf_media_msg_format_ids.h"
83 #endif
84 
85 #ifndef PVMI_KVP_H_INCLUDED
86 #include "pvmi_kvp.h"
87 #endif
88 
89 
90 // Forward declaration
91 class PVMp4FFComposerPort;
92 
93 
94 //memory allocator type for this node.
95 typedef OsclMemAllocator PVMp4FFCNAlloc;
96 
97 /** Node command type */
98 typedef PVMFGenericNodeCommand<PVMp4FFCNAlloc> PVMp4FFCNCmd;
99 
100 /** Command queue type */
101 typedef PVMFNodeCommandQueue<PVMp4FFCNCmd, PVMp4FFCNAlloc> PVMp4FFCNCmdQueue;
102 
103 /** Port vector type */
104 typedef PVMFPortVector<PVMp4FFComposerPort, PVMp4FFCNAlloc> PVMp4FFCNPortVector;
105 
106 #define PROFILING_ON (PVLOGGER_INST_LEVEL >= PVLOGMSG_INST_PROF)
107 
108 #if PROFILING_ON
109 #ifndef PVMF_MEDIA_CLOCK_H_INCLUDED
110 #include "pvmf_media_clock.h"
111 #endif
112 #endif
113 
114 #ifdef ANDROID
115 #include <utils/RefBase.h>
116 
117 namespace android
118 {
119 class FragmentWriter;
120 }
121 #endif
122 
123 ////////////////////////////////////////////////////////////////////////////
124 class PVMp4FFComposerNode : public PVMFNodeInterface,
125         public OsclActiveObject,
126         public PVMp4FFCNTrackConfigInterface,
127         public PVMp4FFCNClipConfigInterface,
128         public PvmfComposerSizeAndDurationInterface,
129         public PvmiCapabilityAndConfig
130 {
131     public:
132         PVMp4FFComposerNode(int32 aPriority);
133         ~PVMp4FFComposerNode();
134 
135         // Pure virtual functions from PVMFNodeInterface
136         OSCL_IMPORT_REF PVMFStatus ThreadLogon();
137         OSCL_IMPORT_REF PVMFStatus ThreadLogoff();
138         OSCL_IMPORT_REF PVMFStatus GetCapability(PVMFNodeCapability& aNodeCapability);
139         OSCL_IMPORT_REF PVMFPortIter* GetPorts(const PVMFPortFilter* aFilter);
140         OSCL_IMPORT_REF PVMFCommandId QueryUUID(PVMFSessionId aSession, const PvmfMimeString& aMimeType,
141                                                 Oscl_Vector<PVUuid, PVMp4FFCNAlloc>& aUuids,
142                                                 bool aExactUuidsOnly = false,
143                                                 const OsclAny* aContext = NULL);
144         OSCL_IMPORT_REF PVMFCommandId QueryInterface(PVMFSessionId aSession, const PVUuid& aUuid,
145                 PVInterface*& aInterfacePtr,
146                 const OsclAny* aContext = NULL);
147         OSCL_IMPORT_REF PVMFCommandId RequestPort(PVMFSessionId aSession, int32 aPortTag,
148                 const PvmfMimeString* aPortConfig = NULL,
149                 const OsclAny* aContext = NULL);
150         OSCL_IMPORT_REF PVMFCommandId ReleasePort(PVMFSessionId aSession, PVMFPortInterface& aPort,
151                 const OsclAny* aContext = NULL);
152         OSCL_IMPORT_REF PVMFCommandId Init(PVMFSessionId aSession, const OsclAny* aContext = NULL);
153         OSCL_IMPORT_REF PVMFCommandId Start(PVMFSessionId aSession, const OsclAny* aContext = NULL);
154         OSCL_IMPORT_REF PVMFCommandId Stop(PVMFSessionId aSession, const OsclAny* aContext = NULL);
155         OSCL_IMPORT_REF PVMFCommandId Pause(PVMFSessionId aSession, const OsclAny* aContext = NULL);
156         OSCL_IMPORT_REF PVMFCommandId Flush(PVMFSessionId aSession, const OsclAny* aContext = NULL);
157         OSCL_IMPORT_REF PVMFCommandId Reset(PVMFSessionId aSession, const OsclAny* aContext = NULL);
158         OSCL_EXPORT_REF PVMFCommandId Prepare(PVMFSessionId aSession, const OsclAny* aContext);
159         OSCL_IMPORT_REF PVMFCommandId CancelAllCommands(PVMFSessionId aSession, const OsclAny* aContextData = NULL);
160         OSCL_IMPORT_REF PVMFCommandId CancelCommand(PVMFSessionId aSession, PVMFCommandId aCmdId,
161                 const OsclAny* aContextData = NULL);
162 
163         // Pure virtual from PVInterface
164         OSCL_IMPORT_REF void addRef();
165         OSCL_IMPORT_REF void removeRef();
166         OSCL_IMPORT_REF bool queryInterface(const PVUuid& uuid, PVInterface*& iface);
167 
168         // Pure virtual functions from PVMp4FFCNClipConfigInterface
169         OSCL_IMPORT_REF PVMFStatus SetOutputFileName(const OSCL_wString& aFileName);
170         OSCL_IMPORT_REF PVMFStatus SetOutputFileDescriptor(const OsclFileHandle* aFileHandle);
171         OSCL_IMPORT_REF PVMFStatus SetAuthoringMode(PVMp4FFCN_AuthoringMode aAuthoringMode = PVMP4FFCN_3GPP_DOWNLOAD_MODE);
172         OSCL_IMPORT_REF PVMFStatus SetPresentationTimescale(uint32 aTimescale);
173         OSCL_IMPORT_REF PVMFStatus SetVersion(const OSCL_wString& aVersion, const OSCL_String& aLangCode);
174         OSCL_IMPORT_REF PVMFStatus SetTitle(const OSCL_wString& aTitle, const OSCL_String& aLangCode);
175         OSCL_IMPORT_REF PVMFStatus SetAuthor(const OSCL_wString& aAuthor, const OSCL_String& aLangCode);
176         OSCL_IMPORT_REF PVMFStatus SetCopyright(const OSCL_wString& aCopyright, const OSCL_String& aLangCode);
177         OSCL_IMPORT_REF PVMFStatus SetDescription(const OSCL_wString& aDescription, const OSCL_String& aLangCode);
178         OSCL_IMPORT_REF PVMFStatus SetRating(const OSCL_wString& aRating, const OSCL_String& aLangCode);
179         OSCL_IMPORT_REF PVMFStatus SetCreationDate(const OSCL_wString& aCreationDate);
180         OSCL_IMPORT_REF PVMFStatus SetRealTimeAuthoring(const bool aRealTime);
181         OSCL_IMPORT_REF PVMFStatus SetAlbumInfo(const OSCL_wString& aAlbum_Title, const OSCL_String& aLangCode);
182         OSCL_IMPORT_REF PVMFStatus SetRecordingYear(uint16 aRecordingYear);
183         OSCL_IMPORT_REF PVMFStatus SetPerformer(const OSCL_wString& aPerformer, const OSCL_String& aLangCode);
184         OSCL_EXPORT_REF PVMFStatus SetGenre(const OSCL_wString& aGenre, const OSCL_String& aLangCode);
185         OSCL_EXPORT_REF PVMFStatus SetClassification(const OSCL_wString& aClassificationInfo, uint32 aClassificationEntity, uint16 aClassificationTable, const OSCL_String& aLangCode);
186         OSCL_EXPORT_REF PVMFStatus SetKeyWord(const OSCL_wString& aKeyWordInfo, const OSCL_String& aLangCode);
187         OSCL_EXPORT_REF PVMFStatus SetLocationInfo(PvmfAssetInfo3GPPLocationStruct& aLocation_info);
188         OSCL_IMPORT_REF uint16 ConvertLangCode(const OSCL_String& aLang);
189 
190         // Pure virtual functions from PVMp4FFCNTrackConfigInterface
191         OSCL_IMPORT_REF PVMFStatus SetTrackReference(const PVMFPortInterface& aPort,
192                 const PVMFPortInterface& aReferencePort);
193         OSCL_IMPORT_REF PVMFStatus SetCodecSpecificInfo(const PVMFPortInterface& aPort, uint8* aInfo, int32 aSize);
194 
195         // Pure virtual from PvmfComposerSizeAndDurationInterface
196         OSCL_IMPORT_REF PVMFStatus SetMaxFileSize(bool aEnable, uint32 aMaxFileSizeBytes);
197         OSCL_IMPORT_REF void GetMaxFileSizeConfig(bool& aEnable, uint32& aMaxFileSizeBytes);
198         OSCL_IMPORT_REF PVMFStatus SetMaxDuration(bool aEnable, uint32 aMaxDurationMilliseconds);
199         OSCL_IMPORT_REF void GetMaxDurationConfig(bool& aEnable, uint32& aMaxDurationMilliseconds);
200         OSCL_IMPORT_REF PVMFStatus SetFileSizeProgressReport(bool aEnable, uint32 aReportFrequency);
201         OSCL_IMPORT_REF void GetFileSizeProgressReportConfig(bool& aEnable, uint32& aReportFrequency);
202         OSCL_IMPORT_REF PVMFStatus SetDurationProgressReport(bool aEnable, uint32 aReportFrequency);
203         OSCL_IMPORT_REF void GetDurationProgressReportConfig(bool& aEnable, uint32& aReportFrequency);
204 
205         //from PVMFPortActivityHandler
206         void HandlePortActivity(const PVMFPortActivity& aActivity);
207 
208         // Friend class
209         friend class PVMp4FFComposerPort;
210         Oscl_Vector<OsclMemoryFragment*, OsclMemAllocator> memvector_sps;
211         Oscl_Vector<OsclMemoryFragment*, OsclMemAllocator> memvector_pps;
212         uint8 iNum_SPS_Set;
213         uint8 iNum_PPS_Set;
214 
215         Oscl_Vector<PVA_FF_TextSampleDescInfo*, OsclMemAllocator> textdecodervector;
216         int32 iText_sdIndex;
217         // implemetation of PvmiCapabilityAndConfig class functions here
218 
219         void setObserver(PvmiConfigAndCapabilityCmdObserver* aObserver);
220 
221         PVMFStatus getParametersSync(PvmiMIOSession aSession, PvmiKeyType aIdentifier,
222                                      PvmiKvp*& aParameters, int& num_parameter_elements,
223                                      PvmiCapabilityContext aContext);
224         PVMFStatus releaseParameters(PvmiMIOSession aSession, PvmiKvp* aParameters, int num_elements);
225         void createContext(PvmiMIOSession aSession, PvmiCapabilityContext& aContext);
226         void setContextParameters(PvmiMIOSession aSession, PvmiCapabilityContext& aContext,
227                                   PvmiKvp* aParameters, int num_parameter_elements);
228         void DeleteContext(PvmiMIOSession aSession, PvmiCapabilityContext& aContext);
229         void setParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters,
230                                int num_elements, PvmiKvp * & aRet_kvp);
231         PVMFCommandId setParametersAsync(PvmiMIOSession aSession, PvmiKvp* aParameters,
232                                          int num_elements, PvmiKvp*& aRet_kvp, OsclAny* context = NULL);
233         uint32 getCapabilityMetric(PvmiMIOSession aSession);
234         PVMFStatus verifyParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters, int aNumElements);
235 
236         // function used in getParametersSync of capability class
237         PVMFStatus GetConfigParameter(PvmiKvp*& aParameters, int& aNumParamElements, int32 aIndex, PvmiKvpAttr reqattr);
238 
239         // function used in VerifyParametersSync n SetParametersSync of capability class
240         PVMFStatus VerifyAndSetConfigParameter(PvmiKvp& aParameter, bool aSetParam);
241 
242     private:
243 #ifdef ANDROID
244         friend class android::FragmentWriter;  // Access AddMemFragToTrack
245 #endif
246 
247         // Pure virtual from OsclActiveObject
248         void Run();
249 
250         /////////////////////////////////////////////////////
251         //     Command processing routines
252         /////////////////////////////////////////////////////
253         PVMFCommandId QueueCommandL(PVMp4FFCNCmd& aCmd);
254         bool ProcessCommand(PVMp4FFCNCmd& aCmd);
255         void CommandComplete(PVMp4FFCNCmdQueue& aQueue, PVMp4FFCNCmd& aCmd, PVMFStatus aStatus, OsclAny* aData = NULL);
256         void DoQueryUuid(PVMp4FFCNCmd& aCmd);
257         void DoQueryInterface(PVMp4FFCNCmd& aCmd);
258         void DoRequestPort(PVMp4FFCNCmd& aCmd);
259         void DoReleasePort(PVMp4FFCNCmd& aCmd);
260         void DoInit(PVMp4FFCNCmd& aCmd);
261         void DoPrepare(PVMp4FFCNCmd& aCmd);
262         void DoStart(PVMp4FFCNCmd& aCmd);
263         PVMFStatus AddTrack(PVMp4FFComposerPort *aPort);
264         void DoStop(PVMp4FFCNCmd& aCmd);
265         void DoFlush(PVMp4FFCNCmd& aCmd);
266         bool IsFlushPending();
267         void FlushComplete();
268         void DoPause(PVMp4FFCNCmd& aCmd);
269         void DoReset(PVMp4FFCNCmd& aCmd);
270         void DoCancelAllCommands(PVMp4FFCNCmd& aCmd);
271         void DoCancelCommand(PVMp4FFCNCmd& aCmd);
272 
273         /////////////////////////////////////////////////////
274         //      Port activity processing routines
275         /////////////////////////////////////////////////////
276         bool IsProcessIncomingMsgReady();
277         /**
278          * Process an incoming message of a the specified port
279          * @param aPort Port where outgoing message is queued.
280          * @return Completion status
281          */
282         PVMFStatus ProcessIncomingMsg(PVMFPortInterface* aPort);
283 
284         PVMFStatus AddMemFragToTrack(Oscl_Vector<OsclMemoryFragment, OsclMemAllocator> aFrame, OsclRefCounterMemFrag& aMemFrag, PVMFFormatType aFormat,
285                                      uint32& aTimestamp, int32 aTrackId, PVMp4FFComposerPort *aPort);
286         int32 GetIETFFrameSize(uint8 aFrameType, int32 aCodecType);
287 
288         /////////////////////////////////////////////////////
289         //    Progress and max size / duration routines
290         /////////////////////////////////////////////////////
291         /**
292          * Send file size or duration report if enabled.
293          * @param aTimestamp Timestamp of current frame in milliseconds.
294          * @return PVMFFailure if informational observer is not set, else PVMFSuccess
295          */
296         PVMFStatus SendProgressReport(uint32 aTimestamp);
297 
298         /**
299          * Check if maximum file size or duration is reached if a maximum is set.
300          *
301          * @param aFrameSize Size of current frame in bytes.
302          * @return PVMFSuccess if feature is enabled and the maximum file size / duration is reached.
303          *         PVMFPending if feature is enabled and the max file size / duration has not been reached.
304          *         PVMFErrNotSupported if feature is not enabled.
305          *         PVMFFailure if informational observer is not set or if max file size or duration is set
306          *         but the finalizing output file failed.
307          */
308         PVMFStatus CheckMaxFileSize(uint32 aFrameSize);
309 
310         /**
311          * Check if maximum file size or duration is reached if a maximum is set.
312          *
313          * @param aTimestamp Timestamp of current frame in milliseconds.
314          * @return PVMFSuccess if feature is enabled and the maximum file size / duration is reached.
315          *         PVMFPending if feature is enabled and the max file size / duration has not been reached.
316          *         PVMFErrNotSupported if feature is not enabled.
317          *         PVMFFailure if informational observer is not set or if max file size or duration is set
318          *         but the finalizing output file failed.
319          */
320         PVMFStatus CheckMaxDuration(uint32 aTimestamp);
321 
322         /**
323          * Finalize the output file.
324          * @return PVMFSuccess if output file is successfully finalized, else PVMFFailure
325          */
326         PVMFStatus RenderToFile();
327 
328         /**
329          * Write DecoderSpecific Info at the end of encoding.
330          * @return void
331          */
332         void WriteDecoderSpecificInfo();
333 
334         /** Clear all pending port activity after max file size or duration is reached. */
335         void ClearPendingPortActivity();
336 
337         /////////////////////////////////////////////////////
338         //      Event reporting routines
339         /////////////////////////////////////////////////////
340         void ReportErrorEvent(PvmfMp4FFCNError aEventType, OsclAny* aEventData = NULL);
341         void ReportInfoEvent(PVMFEventType aEventType, OsclAny* aEventData = NULL);
342         void SetState(TPVMFNodeInterfaceState);
343 
344     private:
345         void GenerateDiagnostics(uint32 aTime, uint32 aSize);
346         void LogDiagnostics();
347         int32 StoreCurrentCommand(PVMp4FFCNCmdQueue&, PVMp4FFCNCmd&, PVMp4FFCNCmdQueue&);
348 
349         // Node command queue
350         PVMp4FFCNCmdQueue iCmdQueue;
351         PVMp4FFCNCmdQueue iCurrentCmd;
352 
353         // Vector of ports contained in this node
354         PVMp4FFCNPortVector iInPorts;
355 
356         // File format
357         PVA_FF_IMpeg4File* iMpeg4File;
358         OSCL_wHeapString<OsclMemAllocator> iFileName;
359         OSCL_wHeapString<OsclMemAllocator> iPostfix;
360         OSCL_wHeapString<OsclMemAllocator> iOutputPath;
361         Oscl_FileServer iFs;
362         int32 iFileType;
363         uint32 iAuthoringMode;
364         uint32 iPresentationTimescale;
365         uint32 iMovieFragmentDuration;
366         Oscl_File* iFileObject;
367 
368 #ifdef ANDROID
369         // Fragment to track writer thread.
370         android::sp<android::FragmentWriter> iFragmentWriter;
371 
372         // Marker to report to the author node an event. It is really of
373         // type PVMFComposerSizeAndDurationEvent but there is no value
374         // in the enum for 'none' so we use a generic int.
375         int iMaxReachedEvent;
376         bool iMaxReachedReported;
377 #endif
378         // Meta data strings
379         struct PVMP4FFCN_MetaDataString
380         {
PVMP4FFCN_MetaDataStringPVMP4FFCN_MetaDataString381             PVMP4FFCN_MetaDataString(): iClassificationEntity(0), iClassificationTable(0), iLangCode(0) {};
382             OSCL_wHeapString<OsclMemAllocator> iDataString;
383             uint32 iClassificationEntity;
384             uint16 iClassificationTable;
385             uint16 iLangCode;
386         };
387         class PVMP4FFCN_KeyWord
388         {
389             public:
PVMP4FFCN_KeyWord()390                 PVMP4FFCN_KeyWord(): iKeyWordSize(0), iLang_Code(0) {};
~PVMP4FFCN_KeyWord()391                 ~PVMP4FFCN_KeyWord() {};
392                 uint32 iKeyWordSize;
393                 uint16 iLang_Code;
394                 OSCL_wHeapString<OsclMemAllocator> iData_String;
395 
PVMP4FFCN_KeyWord(const OSCL_wString & aData_String,uint32 aKeyWordSize,uint16 aLang_Code)396                 PVMP4FFCN_KeyWord(const OSCL_wString& aData_String, uint32 aKeyWordSize, uint16 aLang_Code)
397                 {
398                     iData_String = aData_String;
399                     iKeyWordSize = aKeyWordSize;
400                     iLang_Code = aLang_Code;
401                 }
402 
403         };
404         PVMP4FFCN_MetaDataString iVersion;
405         PVMP4FFCN_MetaDataString iTitle;
406         PVMP4FFCN_MetaDataString iAuthor;
407         PVMP4FFCN_MetaDataString iCopyright;
408         PVMP4FFCN_MetaDataString iDescription;
409         PVMP4FFCN_MetaDataString iRating;
410         PVMP4FFCN_MetaDataString iAlbumTitle;
411         uint16 iRecordingYear;
412         PVMP4FFCN_MetaDataString iPerformer;
413         PVMP4FFCN_MetaDataString iGenre;
414         PVMP4FFCN_MetaDataString iClassification;
415         Oscl_Vector<PVMP4FFCN_KeyWord* , OsclMemAllocator> iKeyWordVector;
416 
417         PvmfAssetInfo3GPPLocationStruct iLocationInfo;
418         OSCL_wHeapString<OsclMemAllocator> iCreationDate;
419 
420         // Convert from timescale
421         MediaClockConverter iClockConverter;
422 
423         // Debug logging
424         PVLogger* iLogger;
425         PVLogger* iDataPathLogger;
426 
427         uint32 iExtensionRefCount;
428 
429         bool iRealTimeTS;
430         bool iInitTSOffset;
431         uint32 iTSOffset;
432 
433         //variables for fileoutputduration config
434         bool iMaxFileSizeEnabled;
435         bool iMaxDurationEnabled;
436         uint32 iMaxFileSize;
437         uint32 iMaxTimeDuration;
438 
439         bool iFileSizeReportEnabled;
440         bool iDurationReportEnabled;
441         uint32 iFileSizeReportFreq;
442         uint32 iDurationReportFreq;
443         uint32 iNextDurationReport;
444         uint32 iNextFileSizeReport;
445 
446         uint32 iCacheSize;
447         int32 iConfigSize;
448         uint8 *pConfig;
449         int32 iTrackId_H264;
450         int32 iTrackId_Text;
451         int32 iSyncSample;
452         PVMFFormatType iformat_h264;
453         PVMFFormatType iformat_text;
454         bool iNodeEndOfDataReached;
455         bool iSampleInTrack;
456         bool iFileRendered;
457 
458 #if PROFILING_ON
459         uint32 iMaxSampleAddTime;
460         uint32 iMinSampleAddTime;
461         uint32 iMinSampleSize;
462         uint32 iMaxSampleSize;
463         uint32 iNumSamplesAdded;
464         PVLogger* iDiagnosticsLogger;
465         bool oDiagnosticsLogged;
466 
467         // Statistics
468         struct PVMp4FFCNStats
469         {
470             int32 iTrackId;
471             uint32 iNumFrames;
472             uint32 iDuration;
473         };
474 
475         PVMp4FFCNStats iStats[3];
476 #endif
477 #ifdef _TEST_AE_ERROR_HANDLING
478         bool iErrorHandlingAddMemFrag;
479         bool iErrorHandlingAddTrack;
480         bool iErrorCreateComposer;
481         bool iErrorRenderToFile;
482         PVMFFormatType iErrorAddTrack;
483         uint32 iErrorNodeCmd;
484         uint32 iTestFileSize;
485         uint32 iTestTimeStamp;
486         uint32 iErrorAddSample;
487         uint32 iFileSize;
488         uint32 iFileDuration;
489         uint32 iErrorDataPathStall;
490 #endif
491 
492         void GetTextSDIndex(uint32 aSampleNum, int32& aIndex);
493 };
494 
495 #endif // PVMP4FFC_NODE_H_INCLUDED
496