MMPLAYER_RETURN_VAL_IF_FAIL(player, FALSE);
MMPLAYER_RETURN_VAL_IF_FAIL(error, FALSE);
- /* NOTE : do somthing necessary inside of __gst_handle_XXX_error. not here */
+ /* NOTE : do something necessary inside of __gst_handle_XXX_error. not here */
memset(&msg_param, 0, sizeof(MMMessageParamType));
msg_param.data = (void *)error->message;
- LOGE("-Msg src : [%s] Domain : [%s] Error : [%s] Code : [%d] is tranlated to error code : [0x%x]",
+ LOGE("-Msg src : [%s] Domain : [%s] Error : [%s] Code : [%d] is translated to error code : [0x%x]",
msg_src_element, g_quark_to_string(error->domain), error->message, error->code, msg_param.code);
}
return TRUE;
}
-/* if retval is FALSE, it will be dropped for perfomance. */
+/* if retval is FALSE, it will be dropped for performance. */
static gboolean
__mmplayer_gst_check_useful_message(mmplayer_t *player, GstMessage *message)
{
ret = _mmplayer_gst_set_position(player, player->pending_seek.pos, FALSE);
if (ret != MM_ERROR_NONE)
- LOGE("failed to seek pending postion. just keep staying current position.");
+ LOGE("failed to seek pending position. just keep staying current position.");
player->pending_seek.is_pending = false;
MMPLAYER_FENTER();
- /* NOTE : EOS event is comming multiple time. watch out it */
+ /* NOTE : EOS event is coming multiple time. watch out it */
/* check state. we only process EOS when pipeline state goes to PLAYING */
if (!(player->cmd == MMPLAYER_COMMAND_START || player->cmd == MMPLAYER_COMMAND_RESUME)) {
LOGD("EOS received on non-playing state. ignoring it");
/* dump state of all element */
_mmplayer_dump_pipeline_state(player);
} else {
- /* traslate gst error code to msl error code. then post it
+ /* translate gst error code to msl error code. then post it
* to application if needed
*/
__mmplayer_handle_gst_error(player, msg, error);
player->seek_state = MMPLAYER_SEEK_NONE;
MMPLAYER_POST_MSG(player, MM_MESSAGE_SEEK_COMPLETED, NULL);
} else if (MMPLAYER_TARGET_STATE(player) == MM_PLAYER_STATE_PLAYING) {
- /* Considering the async state trasition in case of RTSP.
- After getting state change gst msg, seek cmpleted msg will be posted. */
+ /* Considering the async state transition in case of RTSP.
+ After getting state change gst msg, seek completed msg will be posted. */
player->seek_state = MMPLAYER_SEEK_COMPLETED;
}
}
retVal = _mmplayer_gst_set_position(player, player->pending_seek.pos, TRUE);
if (MM_ERROR_NONE != retVal)
- LOGE("failed to seek pending postion. just keep staying current position.");
+ LOGE("failed to seek pending position. just keep staying current position.");
player->pending_seek.is_pending = false;
}
{
if (MMPLAYER_IS_STREAMING(player)) {
// managed prepare async case when buffering is completed
- // pending state should be reset otherwise, it's still playing even though it's resumed after bufferging.
+ // pending state should be reset otherwise, it's still playing even though it's resumed after buffering.
if ((MMPLAYER_CURRENT_STATE(player) != MM_PLAYER_STATE_PLAYING) ||
(MMPLAYER_PENDING_STATE(player) == MM_PLAYER_STATE_PLAYING))
MMPLAYER_SET_STATE(player, MM_PLAYER_STATE_PLAYING);
}
/* custom message for RTSP attribute :
- RTSP case, buffer is not come from server before PLAYING state. However,we have to get attribute after PAUSE state chaged.
+ RTSP case, buffer is not come from server before PLAYING state. However,we have to get attribute after PAUSE state changed.
sdp which has contents info is received when rtsp connection is opened.
extract duration ,codec info , resolution from sdp and get it by GstMessage */
if (!strcmp(structure_name, "rtspsrc_properties")) {
NEW_ELEMENT:
- /* excute new_element if created*/
+ /* execute new_element if created*/
if (new_element) {
LOGD("adding new element to pipeline");
gst_object_unref(sinkpad);
sinkpad = NULL;
- /* run. setting PLAYING here since streamming source is live source */
+ /* run. setting PLAYING here since streaming source is live source */
MMPLAYER_ELEMENT_SET_STATE(new_element, GST_STATE_PLAYING);
}
* [1] audio and video will be dumped with filesink.
* [2] autoplugging is done by just using pad caps.
- * [3] typefinding has happend in audio but audiosink is created already before no-more-pad signal
+ * [3] typefinding has happened in audio but audiosink is created already before no-more-pad signal
* and the video will be dumped via filesink.
*/
if (player->num_dynamic_pad == 0) {
- LOGD("it seems pad caps is directely used for autoplugging. removing fakesink now");
+ LOGD("it seems pad caps is directly used for autoplugging. removing fakesink now");
if (!_mmplayer_gst_remove_fakesink(player,
&player->pipeline->mainbin[MMPLAYER_M_SRC_FAKESINK]))
g_object_set(G_OBJECT(child), "message-forward", TRUE, NULL);
g_object_set(G_OBJECT(element), "message-forward", TRUE, NULL);
+ if (player->type_caps &&
+ !MMPLAYER_IS_HTTP_LIVE_STREAMING(player) &&
+ !MMPLAYER_IS_DASH_STREAMING(player))
+ g_object_set(G_OBJECT(element), "sink-caps", player->type_caps, NULL);
mm_attrs_get_int_by_name(player->attrs, MM_PLAYER_VIDEO_CODEC_TYPE, &video_codec_type);
mm_attrs_get_int_by_name(player->attrs, MM_PLAYER_AUDIO_CODEC_TYPE, &audio_codec_type);
/* CAUTION: if there is hw decoder, the rank value has to be higher than sw decoder
and codec default type in ini has to be hw.
*/
+ LOGD("set codec type v(%d) a(%d)", video_codec_type, audio_codec_type);
if (video_codec_type == MM_PLAYER_CODEC_TYPE_SW)
- g_object_set(G_OBJECT(child), "force-sw-decoder-for-video", TRUE, NULL);
+ g_object_set(G_OBJECT(child), "force-sw-decoders-for-video", TRUE, NULL);
if (audio_codec_type == MM_PLAYER_CODEC_TYPE_SW)
- g_object_set(G_OBJECT(child), "force-sw-decoder-for-audio", TRUE, NULL);
+ g_object_set(G_OBJECT(child), "force-sw-decoders-for-audio", TRUE, NULL);
mainbin[MMPLAYER_M_AUTOPLUG_PARSEBIN].id = MMPLAYER_M_AUTOPLUG_PARSEBIN;
mainbin[MMPLAYER_M_AUTOPLUG_PARSEBIN].gst = element;
return NULL;
}
- LOGD("using http streamming source [%s]", player->ini.httpsrc_element);
+ LOGD("using http streaming source [%s]", player->ini.httpsrc_element);
element = gst_element_factory_make(player->ini.httpsrc_element, "http_streaming_source");
if (!element) {
return MM_ERROR_NONE;
/* NOTE : duration cannot be zero except live streaming.
- * Since some element could have some timing problemn with quering duration, try again.
+ * Since some element could have some timing problem with querying duration, try again.
*/
if (player->duration == 0) {
if (!gst_element_query_duration(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, GST_FORMAT_TIME, &dur_nsec)) {
MMPLAYER_TARGET_STATE(player) = MM_PLAYER_STATE_PLAYING;
if (__mmplayer_gst_pending_seek(player) != MM_ERROR_NONE)
- LOGW("failed to seek pending postion. starting from the begin of content");
+ LOGW("failed to seek pending position. starting from the begin of content");
}
LOGD("current state before doing transition");
return MM_ERROR_PLAYER_INTERNAL;
}
- /* Just set state to PAUESED and the rewind. it's usual player behavior. */
+ /* Just set state to PAUSED and the rewind. it's usual player behavior. */
timeout = MMPLAYER_STATE_CHANGE_TIMEOUT(player);
if ((!MMPLAYER_IS_STREAMING(player) && !MMPLAYER_IS_MS_BUFF_SRC(player)) ||
LOGD("sending event[%s] to sink element [%s] success!",
GST_EVENT_TYPE_NAME(event), GST_ELEMENT_NAME(sink));
- /* rtsp case, asyn_done is not called after seek during pause state */
+ /* rtsp case, async_done is not called after seek during pause state */
if (MMPLAYER_IS_RTSP_STREAMING(player)) {
if (GST_EVENT_TYPE(event) == GST_EVENT_SEEK) {
if (MMPLAYER_TARGET_STATE(player) == MM_PLAYER_STATE_PAUSED) {
}
/* Note : Textbin is not linked to the video or audio bin.
- * It needs to send the event to the text sink seperatelly.
+ * It needs to send the event to the text sink seperately.
*/
if (player->play_subtitle && player->pipeline) {
GstElement *text_sink = GST_ELEMENT_CAST(player->pipeline->textbin[MMPLAYER_T_FAKE_SINK].gst);
{
int ret = MM_ERROR_NONE;
gint64 pos_nsec = 0;
- gboolean accurated = FALSE;
+ gboolean accurate = FALSE;
GstSeekFlags seek_flags = GST_SEEK_FLAG_FLUSH;
MMPLAYER_FENTER();
player->seek_state = MMPLAYER_SEEK_NONE;
MMPLAYER_POST_MSG(player, MM_MESSAGE_SEEK_COMPLETED, NULL);
} else {
- mm_attrs_get_int_by_name(player->attrs, "accurate_seek", &accurated);
- if (accurated)
+ mm_attrs_get_int_by_name(player->attrs, "accurate_seek", &accurate);
+ if (accurate)
seek_flags |= GST_SEEK_FLAG_ACCURATE;
else
seek_flags |= GST_SEEK_FLAG_KEY_UNIT;
*/
player->last_position = position;
- /* MSL should guarante playback rate when seek is selected during trick play of fast forward. */
+ /* MSL should guarantee playback rate when seek is selected during trick play of fast forward. */
if (player->playback_rate > 1.0)
_mmplayer_set_playspeed((MMHandleType)player, player->playback_rate, FALSE);
/* NOTE : get last point to overcome some bad operation of some elements
*(returning zero when getting current position in paused state
- * and when failed to get postion during seeking
+ * and when failed to get position during seeking
*/
if ((current_state == MM_PLAYER_STATE_PAUSED) || (!ret)) {
LOGD("pos_nsec = %"GST_TIME_FORMAT" and ret = %d and state = %d", GST_TIME_ARGS(pos_nsec), ret, current_state);