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_INI_H__
23 #define __MM_STREAMRECORDER_INI_H__
27 #include "mm_streamrecorder.h"
28 #include "mm_streamrecorder_util.h"
34 #define MM_STREAMRECORDER_INI_DEFAULT_PATH "/usr/etc/mmfw_streamrecorder.ini"
36 #define STREAMRECORDER_INI_MAX_STRLEN 256
37 #define STREAMRECORDER_INI_MAX_ELEMENT 10
38 #define STREAMRECORDER_ATTRIBUTE_NUM_MAX 8
43 KEYWORD_AUDIO_ENCODERS,
44 KEYWORD_VIDEO_ENCODERS,
48 typedef struct __mm_streamrecorder_ini {
50 gboolean encsink_src_islive;
53 guint convert_output_buffer_num;
54 guint reset_pause_time;
58 guint encsink_bin_profile;
59 gboolean encsink_bin_auto_audio_resample;
60 gboolean encsink_bin_auto_colorspace;
61 gboolean encsink_bin_auto_audio_convert;
62 gboolean encsink_bin_use_video_toggle;
65 gchar name_of_encsink_src[STREAMRECORDER_INI_MAX_STRLEN];
66 gchar name_of_audio_src[STREAMRECORDER_INI_MAX_STRLEN];
67 gchar h264_video_encoder[STREAMRECORDER_INI_MAX_STRLEN];
68 gchar h263_video_encoder[STREAMRECORDER_INI_MAX_STRLEN];
69 gchar mpeg4_video_encoder[STREAMRECORDER_INI_MAX_STRLEN];
70 gchar name_of_encsink_bin_audio_encoder[STREAMRECORDER_INI_MAX_STRLEN];
71 gchar name_of_encsink_bin_video_converter[STREAMRECORDER_INI_MAX_STRLEN];
72 gchar encsink_bin_use_parser[STREAMRECORDER_INI_MAX_STRLEN];
73 gchar name_of_encsink_bin_3GPMUXER[STREAMRECORDER_INI_MAX_STRLEN];
74 gchar name_of_encsink_bin_MP4MUXER[STREAMRECORDER_INI_MAX_STRLEN];
75 gchar name_of_encsink_sink[STREAMRECORDER_INI_MAX_STRLEN];
78 guint audio_frame_minimum_space;
79 guint audio_frame_wait_time;
82 guint video_frame_wait_time;
85 gint supported_video_width[STREAMRECORDER_ATTRIBUTE_NUM_MAX];
86 gint supported_video_height[STREAMRECORDER_ATTRIBUTE_NUM_MAX];
87 gchar supported_audio_encoders[STREAMRECORDER_ATTRIBUTE_NUM_MAX][STREAMRECORDER_INI_MAX_STRLEN];
88 gchar supported_video_encoders[STREAMRECORDER_ATTRIBUTE_NUM_MAX][STREAMRECORDER_INI_MAX_STRLEN];
89 gchar supported_file_formats[STREAMRECORDER_ATTRIBUTE_NUM_MAX][STREAMRECORDER_INI_MAX_STRLEN];
91 } mm_streamrecorder_ini_t;
93 /*Default sink ini values*/
95 #define DEFAULT_ENCSINK_SRC_IS_LIVE FALSE
96 #define DEFAULT_RETRIAL_COUNT 10
97 #define DEFAULT_MINIMUM_FRAME 5
98 #define DEFAULT_CONVERT_OUTPUT_BUFFER_NUM 6
99 #define DEFAULT_RESET_PAUSE_TIME 0
100 #define DEFAULT_SCREEN_RECORD 1
103 #define DEFAULT_ENCSINK_BIN_PROFILE 0
104 #define DEFAULT_ENCSINK_BIN_AUTO_AUDIO_RESAMPLE FALSE
105 #define DEFAULT_ENCSINK_BIN_AUTO_COLORSPACE TRUE
106 #define DEFAULT_ENCSINK_BIN_AUTO_CONVERT TRUE
107 #define DEFAULT_ENCSINK_BIN_USE_VIDEO_TOGGLE FALSE
110 #define DEFAULT_VIDEO_SOURCE "appsrc"
111 #define DEFAULT_AUDIO_SRC "pulsesrc"
112 #define DEFAULT_NAME_OF_H264_VIDEO_ENCODER "omx_h264enc"
113 #define DEFAULT_NAME_OF_H263_VIDEO_ENCODER "avenc_h263p"
114 #define DEFAULT_NAME_OF_MPEG4_VIDEO_ENCODER "avenc_mpeg4"
115 #define DEFAULT_NAME_OF_AUDIO_ENCODER "avenc_aac"
116 #define DEFAULT_USE_PARSER ""
117 #define DEFAULT_NAME_OF_3GP_MUXER "avmux_3gp"
118 #define DEFAULT_NAME_OF_MP4_MUXER "avmux_mp4"
119 #define DEFAULT_NAME_OF_VIDEO_CONVERTER "videoconvet"
120 #define DEFAULT_NAME_OF_BIN_SINK "filesink"
123 #define DEFAULT_AUDIO_FRAME_MINIMUM_SPACE 102400
124 #define DEFAULT_AUDIO_FRAME_WAIT_TIME 20000
127 #define DEFAULT_VIDEO_FRAME_WAIT_TIME 200000
129 /*supported attribute*/
130 #define DEFAULT_SUPPORTED_WIDTH ""
131 #define DEFAULT_SUPPORTED_HEIGHT ""
132 #define DEFAULT_SUPPORTED_AUDIO_ENCODERS ""
133 #define DEFAULT_SUPPORTED_VIDEO_ENCODERS ""
134 #define DEFAULT_SUPPORTED_FILE_FORMATS ""
137 _mm_streamrecorder_ini_load(mm_streamrecorder_ini_t * ini);
140 _mm_streamrecorder_ini_unload(mm_streamrecorder_ini_t * ini);