mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
playback/player: Move dispatch-to-main-context out of the constructor and make it a normal property
This commit is contained in:
parent
e644c61286
commit
e85d26115a
4 changed files with 7 additions and 4 deletions
|
@ -193,7 +193,7 @@ native_new (JNIEnv * env, jobject thiz)
|
|||
{
|
||||
Player *player = g_slice_new0 (Player);
|
||||
|
||||
player->player = gst_player_new (FALSE);
|
||||
player->player = gst_player_new ();
|
||||
SET_CUSTOM_DATA (env, thiz, native_player_field_id, player);
|
||||
player->java_player = (*env)->NewGlobalRef (env, thiz);
|
||||
|
||||
|
|
|
@ -114,8 +114,9 @@ play_new (gchar ** uris, gdouble initial_volume)
|
|||
play->num_uris = g_strv_length (uris);
|
||||
play->cur_idx = -1;
|
||||
|
||||
play->player = gst_player_new (TRUE);
|
||||
play->player = gst_player_new ();
|
||||
|
||||
g_object_set (play->player, "dispatch-to-main-context", TRUE, NULL);
|
||||
g_signal_connect (play->player, "position-updated",
|
||||
G_CALLBACK (position_updated_cb), play);
|
||||
g_signal_connect (play->player, "end-of-stream",
|
||||
|
|
|
@ -191,7 +191,9 @@ main (gint argc, gchar ** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
play.player = gst_player_new (TRUE);
|
||||
play.player = gst_player_new ();
|
||||
|
||||
g_object_set (play.player, "dispatch-to-main-context", TRUE, NULL);
|
||||
|
||||
if (!gst_uri_is_valid (play.uri)) {
|
||||
gchar *uri = gst_filename_to_uri (play.uri, NULL);
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
media_width = 320;
|
||||
media_height = 240;
|
||||
|
||||
player = gst_player_new(FALSE);
|
||||
player = gst_player_new();
|
||||
g_object_set (player, "window-handle", video_view, NULL);
|
||||
g_object_set (player, "uri", [uri UTF8String], NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue