GStreamer更新到1.22.0
This commit is contained in:
parent
df105dd518
commit
88954a6599
@ -196,8 +196,7 @@ static void state_changed_cb(GstBus *bus, GstMessage *msg, CustomData *data) {
|
|||||||
/* Only pay attention to messages coming from the pipeline, not its children */
|
/* Only pay attention to messages coming from the pipeline, not its children */
|
||||||
if (GST_MESSAGE_SRC (msg) == GST_OBJECT (data->pipeline)) {
|
if (GST_MESSAGE_SRC (msg) == GST_OBJECT (data->pipeline)) {
|
||||||
data->state = new_state;
|
data->state = new_state;
|
||||||
gchar *message = g_strdup_printf("State changed to %s",
|
gchar *message = g_strdup_printf("State changed to %s", gst_element_state_get_name(new_state));
|
||||||
gst_element_state_get_name(new_state));
|
|
||||||
set_ui_message(message, data);
|
set_ui_message(message, data);
|
||||||
g_free(message);
|
g_free(message);
|
||||||
|
|
||||||
@ -217,9 +216,7 @@ static void state_changed_cb(GstBus *bus, GstMessage *msg, CustomData *data) {
|
|||||||
static void check_initialization_complete(CustomData *data) {
|
static void check_initialization_complete(CustomData *data) {
|
||||||
JNIEnv *env = get_jni_env();
|
JNIEnv *env = get_jni_env();
|
||||||
if (!data->initialized && data->native_window && data->main_loop) {
|
if (!data->initialized && data->native_window && data->main_loop) {
|
||||||
GST_DEBUG
|
GST_DEBUG("Initialization complete, notifying application. native_window:%p main_loop:%p", data->native_window, data->main_loop);
|
||||||
("Initialization complete, notifying application. native_window:%p main_loop:%p",
|
|
||||||
data->native_window, data->main_loop);
|
|
||||||
|
|
||||||
/* The main loop is running and we received a native window, inform the sink about it */
|
/* The main loop is running and we received a native window, inform the sink about it */
|
||||||
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY (data->pipeline),
|
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY (data->pipeline),
|
||||||
@ -311,8 +308,7 @@ static void *app_function(void *userdata) {
|
|||||||
static void gst_native_init(JNIEnv *env, jobject thiz) {
|
static void gst_native_init(JNIEnv *env, jobject thiz) {
|
||||||
CustomData *data = g_new0 (CustomData, 1);
|
CustomData *data = g_new0 (CustomData, 1);
|
||||||
SET_CUSTOM_DATA (env, thiz, custom_data_field_id, data);
|
SET_CUSTOM_DATA (env, thiz, custom_data_field_id, data);
|
||||||
GST_DEBUG_CATEGORY_INIT (debug_category, "player", 0,
|
GST_DEBUG_CATEGORY_INIT (debug_category, "player", 0, "HI SHARP DX RTSP Player");
|
||||||
"Android tutorial 5");
|
|
||||||
gst_debug_set_threshold_for_name("player", GST_LEVEL_DEBUG);
|
gst_debug_set_threshold_for_name("player", GST_LEVEL_DEBUG);
|
||||||
GST_DEBUG ("Created CustomData at %p", data);
|
GST_DEBUG ("Created CustomData at %p", data);
|
||||||
data->app = (*env)->NewGlobalRef(env, thiz);
|
data->app = (*env)->NewGlobalRef(env, thiz);
|
||||||
@ -455,8 +451,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
|
|||||||
java_vm = vm;
|
java_vm = vm;
|
||||||
|
|
||||||
if ((*vm)->GetEnv(vm, (void **) &env, JNI_VERSION_1_4) != JNI_OK) {
|
if ((*vm)->GetEnv(vm, (void **) &env, JNI_VERSION_1_4) != JNI_OK) {
|
||||||
__android_log_print(ANDROID_LOG_ERROR, "player",
|
__android_log_print(ANDROID_LOG_ERROR, "player", "Could not retrieve JNIEnv");
|
||||||
"Could not retrieve JNIEnv");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
jclass klass = (*env)->FindClass(env, "com/hisharp/gstreamer_player/GstLibrary");
|
jclass klass = (*env)->FindClass(env, "com/hisharp/gstreamer_player/GstLibrary");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user