19
|
1 |
/*
|
25
|
2 |
* Copyright (c) 2009 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: Media Recoder Adaptation for GST Header
|
|
15 |
*
|
|
16 |
*/
|
19
|
17 |
|
|
18 |
#ifndef XAMEDIARECORDERADAPTCTX_H_
|
|
19 |
#define XAMEDIARECORDERADAPTCTX_H_
|
|
20 |
|
|
21 |
#include "xaadaptationgst.h"
|
53
|
22 |
|
19
|
23 |
|
|
24 |
/* TYPEDEFS */
|
|
25 |
|
|
26 |
/* context to track buffer insufficient event */
|
25
|
27 |
typedef struct recordItfCtx_
|
|
28 |
{
|
19
|
29 |
XAImplSemHandle bufInsufficientSem;
|
|
30 |
XAboolean buffer_insufficient;
|
25
|
31 |
} recodtItfCtx;
|
19
|
32 |
|
|
33 |
typedef struct XAMediaRecorderAdaptationCtx_ XAMediaRecorderAdaptationCtx;
|
|
34 |
|
|
35 |
typedef struct XAMediaRecorderAdaptationCtx_
|
25
|
36 |
{
|
19
|
37 |
/* Parent*/
|
|
38 |
XAAdaptationGstCtx_ baseObj;
|
|
39 |
|
|
40 |
/* OMX-AL Variables */
|
25
|
41 |
XADataSource *xaAudioSource, *xaVideoSource;
|
|
42 |
XADataSink *xaSink;
|
|
43 |
XAuint8 recModes;
|
19
|
44 |
|
|
45 |
/* GST elements */
|
25
|
46 |
GstElement *datasink;
|
53
|
47 |
//XAboolean isobjsink; /*is sink another XA object?*/
|
25
|
48 |
GstElement *codecbin;
|
53
|
49 |
//GstElement *audioppbin;
|
25
|
50 |
GstElement *audiofilter;
|
53
|
51 |
//GstElement *videoppbin;
|
|
52 |
//GstElement *videofilter;
|
|
53 |
//GstElement *videoextract;
|
25
|
54 |
GstElement *audiosource;
|
53
|
55 |
//GstElement *audioqueue;
|
|
56 |
//XAboolean isobjasrc; /*is audio source another XA object?*/
|
|
57 |
//GstElement *videosource;
|
|
58 |
//GstState vsrcOrigState;
|
|
59 |
//GstElement *videoqueue;
|
|
60 |
//XAboolean isobjvsrc; /*is video source another XA object?*/
|
25
|
61 |
XAboolean encodingchanged;
|
19
|
62 |
|
53
|
63 |
//XAboolean mute;
|
|
64 |
//XAuint32 imageEffectID;
|
|
65 |
//XAboolean isStereoPosition;
|
25
|
66 |
XAuint32 xaRecordState;
|
53
|
67 |
//XAmillidegree curRotation;
|
|
68 |
//XAuint32 curMirror;
|
25
|
69 |
XAboolean isRecord;
|
19
|
70 |
|
|
71 |
/* internals */
|
25
|
72 |
XAboolean trackpositionenabled;
|
|
73 |
gboolean runpositiontimer;
|
|
74 |
GSourceFunc positionCb;
|
19
|
75 |
|
53
|
76 |
//XAImplThreadHandle recordingEventThr;
|
|
77 |
//recodtItfCtx recThrCtx;
|
19
|
78 |
|
|
79 |
/* Variables for snapshot */
|
53
|
80 |
//XASnapshotItfVars snapshotVars;
|
19
|
81 |
|
53
|
82 |
//XAMetadataAdaptVars *metadatavars;
|
19
|
83 |
|
|
84 |
/* Variables for encoders */
|
25
|
85 |
XAAudioEncoderSettings audioEncSettings;
|
53
|
86 |
//XAVideoSettings videoEncSettings;
|
|
87 |
//XAImageSettings imageEncSettings;
|
19
|
88 |
|
|
89 |
/*buffersink variable*/
|
53
|
90 |
//guint64 writepos;
|
19
|
91 |
|
25
|
92 |
} XAMediaRecorderAdaptationCtx_;
|
19
|
93 |
|
|
94 |
/* FUNCTIONS */
|
25
|
95 |
XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create(XADataSource* pAudioSrc,
|
|
96 |
XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes);
|
|
97 |
XAresult XAMediaRecorderAdapt_PostInit(XAAdaptationGstCtx* bCtx);
|
|
98 |
void XAMediaRecorderAdapt_Destroy(XAAdaptationGstCtx* bCtx);
|
19
|
99 |
/*XAresult XAMediaRecorderAdapt_InitContentPipeSink(XAMediaRecorderAdaptationCtx* ctx);*/
|
25
|
100 |
XAresult XAMediaRecorderAdapt_ChangeEncoders(
|
|
101 |
XAMediaRecorderAdaptationCtx_* mCtx);
|
|
102 |
XAresult XAMediaRecorderAdapt_CheckCodec(XAMediaRecorderAdaptationCtx_* mCtx,
|
|
103 |
XACapsType encType, XAuint32 encoderId);
|
19
|
104 |
|
|
105 |
#endif /* XAMEDIARECORDERADAPTCTX_H_ */
|