projects
/
platform
/
core
/
multimedia
/
libmm-player.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[0.6.231] Fix typo error
[platform/core/multimedia/libmm-player.git]
/
src
/
mm_player_gst.c
diff --git
a/src/mm_player_gst.c
b/src/mm_player_gst.c
index
da38d53
..
cefa10e
100644
(file)
--- a/
src/mm_player_gst.c
+++ b/
src/mm_player_gst.c
@@
-424,7
+424,7
@@
__mmplayer_handle_gst_error(mmplayer_t *player, GstMessage *message, GError *err
MMPLAYER_RETURN_VAL_IF_FAIL(player, FALSE);
MMPLAYER_RETURN_VAL_IF_FAIL(error, FALSE);
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 som
e
thing necessary inside of __gst_handle_XXX_error. not here */
memset(&msg_param, 0, sizeof(MMMessageParamType));
memset(&msg_param, 0, sizeof(MMMessageParamType));
@@
-448,7
+448,7
@@
__mmplayer_handle_gst_error(mmplayer_t *player, GstMessage *message, GError *err
msg_param.data = (void *)error->message;
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 tran
s
lated to error code : [0x%x]",
msg_src_element, g_quark_to_string(error->domain), error->message, error->code, msg_param.code);
}
msg_src_element, g_quark_to_string(error->domain), error->message, error->code, msg_param.code);
}
@@
-914,7
+914,7
@@
__mmplayer_gst_extract_tag_from_msg(mmplayer_t *player, GstMessage *msg)
return TRUE;
}
return TRUE;
}
-/* if retval is FALSE, it will be dropped for perfomance. */
+/* if retval is FALSE, it will be dropped for perfo
r
mance. */
static gboolean
__mmplayer_gst_check_useful_message(mmplayer_t *player, GstMessage *message)
{
static gboolean
__mmplayer_gst_check_useful_message(mmplayer_t *player, GstMessage *message)
{
@@
-1295,7
+1295,7
@@
__mmplayer_gst_pending_seek(mmplayer_t *player)
ret = _mmplayer_gst_set_position(player, player->pending_seek.pos, FALSE);
if (ret != MM_ERROR_NONE)
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 pos
i
tion. just keep staying current position.");
player->pending_seek.is_pending = false;
player->pending_seek.is_pending = false;
@@
-1372,7
+1372,7
@@
__mmplayer_gst_handle_eos_message(mmplayer_t *player, GstMessage *msg)
MMPLAYER_FENTER();
MMPLAYER_FENTER();
- /* NOTE : EOS event is com
m
ing 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");
/* 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");
@@
-1446,7
+1446,7
@@
__mmplayer_gst_handle_error_message(mmplayer_t *player, GstMessage *msg)
/* dump state of all element */
_mmplayer_dump_pipeline_state(player);
} else {
/* dump state of all element */
_mmplayer_dump_pipeline_state(player);
} else {
- /* traslate gst error code to msl error code. then post it
+ /* tra
n
slate gst error code to msl error code. then post it
* to application if needed
*/
__mmplayer_handle_gst_error(player, msg, error);
* to application if needed
*/
__mmplayer_handle_gst_error(player, msg, error);
@@
-1545,8
+1545,8
@@
__mmplayer_gst_handle_buffering_message(mmplayer_t *player, GstMessage *msg)
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) {
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 tra
n
sition in case of RTSP.
+ After getting state change gst msg, seek c
o
mpleted msg will be posted. */
player->seek_state = MMPLAYER_SEEK_COMPLETED;
}
}
player->seek_state = MMPLAYER_SEEK_COMPLETED;
}
}
@@
-1629,7
+1629,7
@@
__mmplayer_gst_handle_state_message(mmplayer_t *player, GstMessage *msg)
retVal = _mmplayer_gst_set_position(player, player->pending_seek.pos, TRUE);
if (MM_ERROR_NONE != retVal)
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 pos
i
tion. just keep staying current position.");
player->pending_seek.is_pending = false;
}
player->pending_seek.is_pending = false;
}
@@
-1672,7
+1672,7
@@
__mmplayer_gst_handle_state_message(mmplayer_t *player, GstMessage *msg)
{
if (MMPLAYER_IS_STREAMING(player)) {
// managed prepare async case when buffering is completed
{
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 buffer
g
ing.
+ // 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);
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);
@@
-1787,7
+1787,7
@@
__mmplayer_gst_handle_element_message(mmplayer_t *player, GstMessage *msg)
}
/* custom message for RTSP attribute :
}
/* 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 cha
n
ged.
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")) {
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")) {
@@
-2663,7
+2663,7
@@
__mmplayer_gst_rtp_dynamic_pad(GstElement *element, GstPad *pad, gpointer data)
NEW_ELEMENT:
NEW_ELEMENT:
- /* excute new_element if created*/
+ /* ex
e
cute new_element if created*/
if (new_element) {
LOGD("adding new element to pipeline");
if (new_element) {
LOGD("adding new element to pipeline");
@@
-2692,7
+2692,7
@@
NEW_ELEMENT:
gst_object_unref(sinkpad);
sinkpad = NULL;
gst_object_unref(sinkpad);
sinkpad = NULL;
- /* run. setting PLAYING here since stream
m
ing source is live source */
+ /* run. setting PLAYING here since streaming source is live source */
MMPLAYER_ELEMENT_SET_STATE(new_element, GST_STATE_PLAYING);
}
MMPLAYER_ELEMENT_SET_STATE(new_element, GST_STATE_PLAYING);
}
@@
-2735,11
+2735,11
@@
__mmplayer_gst_rtp_no_more_pads(GstElement *element, gpointer data)
* [1] audio and video will be dumped with filesink.
* [2] autoplugging is done by just using pad caps.
* [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 happen
e
d 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) {
* and the video will be dumped via filesink.
*/
if (player->num_dynamic_pad == 0) {
- LOGD("it seems pad caps is direct
e
ly 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]))
if (!_mmplayer_gst_remove_fakesink(player,
&player->pipeline->mainbin[MMPLAYER_M_SRC_FAKESINK]))
@@
-3125,6
+3125,10
@@
__mmplayer_gst_deep_element_added(GstElement *bin, GstBin *child, GstElement *el
g_object_set(G_OBJECT(child), "message-forward", TRUE, NULL);
g_object_set(G_OBJECT(element), "message-forward", TRUE, NULL);
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);
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);
@@
-3240,7
+3244,7
@@
__mmplayer_gst_make_http_src(mmplayer_t *player)
return NULL;
}
return NULL;
}
- LOGD("using http stream
m
ing 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) {
element = gst_element_factory_make(player->ini.httpsrc_element, "http_streaming_source");
if (!element) {
@@
-3375,7
+3379,7
@@
__mmplayer_gst_check_duration(mmplayer_t *player, gint64 position)
return MM_ERROR_NONE;
/* NOTE : duration cannot be zero except live streaming.
return MM_ERROR_NONE;
/* NOTE : duration cannot be zero except live streaming.
- * Since some element could have some timing problem
n with quer
ing duration, try again.
+ * Since some element could have some timing problem
with query
ing duration, try again.
*/
if (player->duration == 0) {
if (!gst_element_query_duration(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, GST_FORMAT_TIME, &dur_nsec)) {
*/
if (player->duration == 0) {
if (!gst_element_query_duration(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, GST_FORMAT_TIME, &dur_nsec)) {
@@
-3513,7
+3517,7
@@
_mmplayer_gst_start(mmplayer_t *player)
MMPLAYER_TARGET_STATE(player) = MM_PLAYER_STATE_PLAYING;
if (__mmplayer_gst_pending_seek(player) != MM_ERROR_NONE)
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 pos
i
tion. starting from the begin of content");
}
LOGD("current state before doing transition");
}
LOGD("current state before doing transition");
@@
-3562,7
+3566,7
@@
_mmplayer_gst_stop(mmplayer_t *player)
return MM_ERROR_PLAYER_INTERNAL;
}
return MM_ERROR_PLAYER_INTERNAL;
}
- /* Just set state to PAU
E
SED 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)) ||
timeout = MMPLAYER_STATE_CHANGE_TIMEOUT(player);
if ((!MMPLAYER_IS_STREAMING(player) && !MMPLAYER_IS_MS_BUFF_SRC(player)) ||
@@
-3799,7
+3803,7
@@
_mmplayer_gst_send_event_to_sink(mmplayer_t *player, GstEvent *event)
LOGD("sending event[%s] to sink element [%s] success!",
GST_EVENT_TYPE_NAME(event), GST_ELEMENT_NAME(sink));
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, asyn
c
_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) {
if (MMPLAYER_IS_RTSP_STREAMING(player)) {
if (GST_EVENT_TYPE(event) == GST_EVENT_SEEK) {
if (MMPLAYER_TARGET_STATE(player) == MM_PLAYER_STATE_PAUSED) {
@@
-3827,7
+3831,7
@@
_mmplayer_gst_send_event_to_sink(mmplayer_t *player, GstEvent *event)
}
/* Note : Textbin is not linked to the video or audio bin.
}
/* Note : Textbin is not linked to the video or audio bin.
- * It needs to send the event to the text sink seperatel
l
y.
+ * 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);
*/
if (player->play_subtitle && player->pipeline) {
GstElement *text_sink = GST_ELEMENT_CAST(player->pipeline->textbin[MMPLAYER_T_FAKE_SINK].gst);
@@
-3884,7
+3888,7
@@
_mmplayer_gst_set_position(mmplayer_t *player, gint64 position, gboolean interna
{
int ret = MM_ERROR_NONE;
gint64 pos_nsec = 0;
{
int ret = MM_ERROR_NONE;
gint64 pos_nsec = 0;
- gboolean accurate
d
= FALSE;
+ gboolean accurate = FALSE;
GstSeekFlags seek_flags = GST_SEEK_FLAG_FLUSH;
MMPLAYER_FENTER();
GstSeekFlags seek_flags = GST_SEEK_FLAG_FLUSH;
MMPLAYER_FENTER();
@@
-3942,8
+3946,8
@@
_mmplayer_gst_set_position(mmplayer_t *player, gint64 position, gboolean interna
player->seek_state = MMPLAYER_SEEK_NONE;
MMPLAYER_POST_MSG(player, MM_MESSAGE_SEEK_COMPLETED, NULL);
} else {
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", &accurate
d
);
- if (accurate
d
)
+ 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;
seek_flags |= GST_SEEK_FLAG_ACCURATE;
else
seek_flags |= GST_SEEK_FLAG_KEY_UNIT;
@@
-3961,7
+3965,7
@@
_mmplayer_gst_set_position(mmplayer_t *player, gint64 position, gboolean interna
*/
player->last_position = position;
*/
player->last_position = position;
- /* MSL should guarante playback rate when seek is selected during trick play of fast forward. */
+ /* MSL should guarante
e
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);
if (player->playback_rate > 1.0)
_mmplayer_set_playspeed((MMHandleType)player, player->playback_rate, FALSE);
@@
-4012,7
+4016,7
@@
_mmplayer_gst_get_position(mmplayer_t *player, gint64 *position)
/* NOTE : get last point to overcome some bad operation of some elements
*(returning zero when getting current position in paused state
/* 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 pos
i
tion 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);
*/
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);