4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hyuntae Kim <ht1211.kim@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef __MM_STREAMRECORDER_FILEINFO_H__
23 #define __MM_STREAMRECORDER_FILEINFO_H__
25 /*=======================================================================================
27 ========================================================================================*/
33 /*=======================================================================================
34 | GLOBAL DEFINITIONS AND DECLARATIONS FOR STREAMRECORDER |
35 ========================================================================================*/
37 /*=======================================================================================
39 ========================================================================================*/
41 #define MMSTREAMRECORDER_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
42 #define MMSTREAMRECORDER_FOURCC_ARGS(fourcc) \
43 ((gchar)((fourcc)&0xff)), \
44 ((gchar)(((fourcc)>>8)&0xff)), \
45 ((gchar)(((fourcc)>>16)&0xff)), \
46 ((gchar)(((fourcc)>>24)&0xff))
48 /*=======================================================================================
50 ========================================================================================*/
54 #define _OFFSET_COMPOSITION_MATRIX 40L
56 /*=======================================================================================
57 | STRUCTURE DEFINITIONS |
58 ========================================================================================*/
61 char *filename; /**< recorded filename */
62 guint64 filesize; /**< current file size */
63 guint64 max_size; /**< max recording size */
64 guint64 max_time; /**< max recording time */
65 int fileformat; /**< recording file format */
66 } _MMStreamRecorderFileInfo;
69 * Structure of location info
75 } _MMStreamRecorderLocationInfo;
77 enum MMStreamReorderTagVideoOrientation {
78 MM_STREAMRECORDER_TAG_VIDEO_ORT_NONE = 0, /**< No Orientation.*/
79 MM_STREAMRECORDER_TAG_VIDEO_ORT_90, /**< 90 degree */
80 MM_STREAMRECORDER_TAG_VIDEO_ORT_180, /**< 180 degree */
81 MM_STREAMRECORDER_TAG_VIDEO_ORT_270, /**< 270 degree */
84 /*=======================================================================================
85 | CONSTANT DEFINITIONS |
86 ========================================================================================*/
91 #define MMFILE_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
92 #define MMFILE_FOURCC_ARGS(fourcc) \
93 ((gchar)((fourcc)&0xff)), \
94 ((gchar)(((fourcc)>>8)&0xff)), \
95 ((gchar)(((fourcc)>>16)&0xff)), \
96 ((gchar)(((fourcc)>>24)&0xff))
98 /*=======================================================================================
99 | GLOBAL FUNCTION PROTOTYPES |
100 ========================================================================================*/
103 /* find top level tag only, do not use this function for finding sub level tags.
104 tag_fourcc is Four-character-code (FOURCC) */
107 gboolean _mmstreamrecorder_find_fourcc(FILE *f, guint32 tag_fourcc, gboolean do_rewind);
108 gboolean _mmstreamrecorder_update_size(FILE *f, gint64 prev_pos, gint64 curr_pos);
109 guint64 _mmstreamrecorder_get_container_size(const guchar *size);
113 gboolean _mmstreamrecorder_write_udta(FILE *f, _MMStreamRecorderLocationInfo info);
114 gboolean _mmstreamrecorder_update_size(FILE *f, gint64 prev_pos, gint64 curr_pos);
117 gboolean _mmstreamrecorder_write_udta(FILE *f, _MMStreamRecorderLocationInfo info);
120 gboolean _mmstreamrecorder_write_udta_m4a(FILE *f);
121 gboolean _mmstreamrecorder_audio_add_metadata_info_m4a(MMHandleType handle);
126 #endif /* __MM_STREAMRECORDER_FILEINFO_H__ */