#include <vconf.h>
#include <mm_attrs_private.h>
#include <mm_attrs.h>
+#ifndef GST_API_VERSION_1
#include <gst/interfaces/xoverlay.h>
-
+#else
+#include <gst/video/videooverlay.h>
+#endif
#include "mm_player_priv.h"
#include "mm_player_attrs.h"
{
/* check videosink element is created */
if ( !player->pipeline ||
- !player->pipeline->videobin ||
- !player->pipeline->videobin[MMPLAYER_V_SINK].gst )
+ !player->pipeline->videobin ||
+ !player->pipeline->videobin[MMPLAYER_V_SINK].gst )
{
- debug_warning("videosink element is not yet ready");
/*
* The attribute should be committed even though videobin is not created yet.
* So, true should be returned here.
debug_fenter();
- return_if_fail(handle);
+ return_val_if_fail (handle, 0);
MMPlayerAttrsSpec player_attrs[] =
{
2
},
{
+ "audio_latency_mode",
+ MM_ATTRS_TYPE_INT,
+ MM_ATTRS_FLAG_RW,
+ (void *) 1, // 0: low latency, 1: middle latency 2: high latency
+ MM_ATTRS_VALID_TYPE_INT_RANGE,
+ 0,
+ 2
+ },
+ {
"pcm_extraction", // enable pcm extraction
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
if ( !base )
{
- debug_error("Cannot create mmplayer attribute\n");
- goto ERROR;
+ debug_error("failed to alloc attrs constructor");
+ return 0;
}
/* initialize values of attributes */
if ( !attrs )
{
- debug_error("Cannot create mmplayer attribute\n");
- goto ERROR;
+ debug_error("failed to create player attrs");
+ return 0;
}
/* set validity type and range */
debug_fleave();
return attrs;
-
-ERROR:
- _mmplayer_deconstruct_attribute(handle);
-
- return FALSE;
}
bool
mm_player_t *player = MM_PLAYER_CAST(handle);
- return_if_fail( player );
+ return_val_if_fail ( player, FALSE );
if (player->attrs)
{
}
debug_fleave();
+
+ return TRUE;
}