/* missing plugin during autoplugging */
MissingCodec not_supported_codec;
- /*unlinked audio/video mime type */
+ /* unlinked audio/video mime type */
gchar *unlinked_video_mime;
gchar *unlinked_audio_mime;
gchar *unlinked_demuxer_mime;
/* subtitle stream caps parsed by demuxer or set by external demuxer */
GstCaps* s_stream_caps;
- /*es player using feed-data callback or calling app_src_push_buffer directly*/
+ /* es player using feed-data callback or calling app_src_push_buffer directly*/
gboolean es_player_push_mode;
/* tmb buffer manager for s/w codec tmb_bo */
LOGW("capturing... we can't do any more");
return MM_ERROR_PLAYER_INVALID_STATE;
}
+ gint surface_type = 0;
+ mm_attrs_get_int_by_name (player->attrs, "display_surface_type", &surface_type);
/* check if video pipeline is linked or not */
if (!player->pipeline->videobin)
{
- LOGW("not ready to capture");
- return MM_ERROR_PLAYER_INVALID_STATE;
+ if (surface_type == MM_DISPLAY_SURFACE_REMOTE && player->video_fakesink)
+ LOGD("it is evas surface type.");
+ else
+ {
+ LOGW("not ready to capture");
+ return MM_ERROR_PLAYER_INVALID_STATE;
+ }
}
/* check if drm file */
return MM_ERROR_PLAYER_DRM_OUTPUT_PROTECTION;
}
- pad = gst_element_get_static_pad(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "sink" );
+ if (player->pipeline->videobin)
+ pad = gst_element_get_static_pad(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "sink" );
+ else // evas surface
+ pad = gst_element_get_static_pad (player->video_fakesink, "sink");
if (player->state != MM_PLAYER_STATE_PLAYING)
{
gst_element_get_state(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, NULL, NULL, 5 * GST_SECOND); //5 seconds
- g_object_get(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "last-sample", &sample, NULL);
+ if (player->pipeline->videobin)
+ g_object_get(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "last-sample", &sample, NULL);
+ else // evas surface
+ g_object_get(player->video_fakesink, "last-sample", &sample, NULL);
if (sample)
{
gint stype = 0;
mm_attrs_get_int_by_name (player->attrs, "display_surface_type", &stype);
- if (stype == MM_DISPLAY_SURFACE_NULL)
+ if (stype == MM_DISPLAY_SURFACE_NULL || stype == MM_DISPLAY_SURFACE_REMOTE)
{
if (player->v_stream_caps)
{
mm_attrs_get_int_by_name (player->attrs, "display_surface_type", &stype);
/* don't make video because of not required, and not support multiple track */
- if (stype == MM_DISPLAY_SURFACE_NULL)
+ if (stype == MM_DISPLAY_SURFACE_NULL || stype == MM_DISPLAY_SURFACE_REMOTE)
{
LOGD ("no video sink by null surface or multiple track");
gchar *caps_str = gst_caps_to_string(caps);
mm_attrs_get_int_by_name(player->attrs, "display_surface_client_type", &surface_client_type);
LOGD("display_surface_type : server(%d), client(%d)\n", surface_type, surface_client_type);
- if (surface_type == MM_DISPLAY_SURFACE_NULL)
+ if (surface_type == MM_DISPLAY_SURFACE_NULL || surface_type == MM_DISPLAY_SURFACE_REMOTE)
{
LOGD("not make videobin because it dose not want\n");
goto ERROR;
/* do nothing */
}
break;
+ case MM_DISPLAY_SURFACE_REMOTE:
+ {
+ /* do nothing */
+ }
+ break;
}
MMPLAYER_FLEAVE();
else
goto ERROR;
break;
+ case MM_DISPLAY_SURFACE_REMOTE:
+ if (strlen(player->ini.videosink_element_fake) > 0)
+ videosink_element = player->ini.videosink_element_fake;
+ else
+ goto ERROR;
+ break;
default:
LOGE("unidentified surface type");
goto ERROR;
}
break;
}
+ case MM_DISPLAY_SURFACE_REMOTE:
+ {
+ break;
+ }
default:
break;
}
case MM_DISPLAY_SURFACE_EVAS:
case MM_DISPLAY_SURFACE_GL:
case MM_DISPLAY_SURFACE_NULL:
+ case MM_DISPLAY_SURFACE_REMOTE:
if (__mmplayer_gst_create_plain_text_elements(player) != MM_ERROR_NONE)
{
LOGE("failed to make plain text elements\n");
mm_attrs_get_int_by_name (player->attrs, "display_surface_type", &stype);
/* don't make video because of not required */
- if (stype == MM_DISPLAY_SURFACE_NULL)
+ if (stype == MM_DISPLAY_SURFACE_NULL || stype == MM_DISPLAY_SURFACE_REMOTE)
{
if (player->set_mode.media_packet_video_stream == FALSE
&& !player->video_stream_cb)
mm_attrs_get_int_by_name (player->attrs, "display_surface_type", &stype);
/* don't make video because of not required */
- if (stype == MM_DISPLAY_SURFACE_NULL)
+ if (stype == MM_DISPLAY_SURFACE_NULL || stype == MM_DISPLAY_SURFACE_REMOTE)
{
LOGD("no video because it's not required");
return;