From 768e602485c31016273bf4bb6c0bb03f5fd57e65 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Tue, 9 Oct 2012 10:39:38 +0200 Subject: [PATCH] Changed all comments to //, because Confluence has problems syntax highlighting Java with /* */ comments. Awesome. --- .../tutorial_1/Tutorial1.java | 2 +- .../tutorial_2/Tutorial2.java | 40 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/gst-sdk/tutorials/android-tutorial-1/src/com/gst_sdk_tutorials/tutorial_1/Tutorial1.java b/gst-sdk/tutorials/android-tutorial-1/src/com/gst_sdk_tutorials/tutorial_1/Tutorial1.java index 7dd0ccd031..57a7ae6106 100644 --- a/gst-sdk/tutorials/android-tutorial-1/src/com/gst_sdk_tutorials/tutorial_1/Tutorial1.java +++ b/gst-sdk/tutorials/android-tutorial-1/src/com/gst_sdk_tutorials/tutorial_1/Tutorial1.java @@ -10,7 +10,7 @@ import com.gst_sdk.GStreamer; public class Tutorial1 extends Activity { private native String nativeGetGStreamerInfo(); - /* Called when the activity is first created. */ + // Called when the activity is first created. @Override public void onCreate(Bundle savedInstanceState) { diff --git a/gst-sdk/tutorials/android-tutorial-2/src/com/gst_sdk_tutorials/tutorial_2/Tutorial2.java b/gst-sdk/tutorials/android-tutorial-2/src/com/gst_sdk_tutorials/tutorial_2/Tutorial2.java index 9cbcb35efe..5cec306ca4 100644 --- a/gst-sdk/tutorials/android-tutorial-2/src/com/gst_sdk_tutorials/tutorial_2/Tutorial2.java +++ b/gst-sdk/tutorials/android-tutorial-2/src/com/gst_sdk_tutorials/tutorial_2/Tutorial2.java @@ -12,24 +12,24 @@ import android.widget.Toast; import com.gst_sdk.GStreamer; public class Tutorial2 extends Activity { - private native void nativeInit(); /* Initialize native code, build pipeline, etc */ - private native void nativeFinalize(); /* Destroy pipeline and shutdown native code */ - private native void nativePlay(); /* Set pipeline to PLAYING */ - private native void nativePause(); /* Set pipeline to PAUSED */ - private static native boolean nativeClassInit(); /* Initialize native class: cache Method IDs for callbacks */ - private long native_custom_data; /* Native code will use this to keep private data */ + private native void nativeInit(); // Initialize native code, build pipeline, etc + private native void nativeFinalize(); // Destroy pipeline and shutdown native code + private native void nativePlay(); // Set pipeline toPLAYING + private native void nativePause(); // Set pipeline toPAUSED + private static native boolean nativeClassInit(); // Initialize native class: cache Method IDs for callbacks + private long native_custom_data; // Native code will use this to keep private data - private boolean is_playing_desired; /* Whether the user asked to go to PLAYING */ + private boolean is_playing_desired; // Whether the user asked to go to PLAYING - private Bundle initialization_data; /* onCreate parameters kept for later */ + private Bundle initialization_data; // onCreate parameters kept for later - /* Called when the activity is first created. */ + // Called when the activity is first created. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - /* Initialize GStreamer and warn if it fails */ + // Initialize GStreamer and warn if it fails try { GStreamer.init(this); } catch (Exception e) { @@ -56,12 +56,11 @@ public class Tutorial2 extends Activity { } }); - /* Keep the instance state for later, since we will not perform our initialization - * until the native code reports that it is itself initialized. - */ + // Keep the instance state for later, since we will not perform ourinitialization + // until the native code reports that it is itselfinitialized. initialization_data = savedInstanceState; - /* Start with disabled buttons, until native code is initialized */ + // Start with disabled buttons, until native code is initialized this.findViewById(R.id.button_play).setEnabled(false); this.findViewById(R.id.button_stop).setEnabled(false); is_playing_desired = false; @@ -79,7 +78,7 @@ public class Tutorial2 extends Activity { super.onDestroy(); } - /* Called from native code. This sets the content of the TextView from the UI thread. */ + // Called from native code. This sets the content of the TextView from the UI thread. private void setMessage(final String message) { final TextView tv = (TextView) this.findViewById(R.id.textview_message); runOnUiThread (new Runnable() { @@ -89,24 +88,23 @@ public class Tutorial2 extends Activity { }); } - /* Called from native code. Native code calls this once it has created its pipeline and - * the main loop is running, so it is ready to accept commands. - */ + // Called from native code. Native code calls this once it has created its pipelineand + // the main loop is running, so it is ready to acceptcommands. private void onGStreamerInitialized () { - /* If initialization data is present, retrieve it */ + // If initialization data is present, retrieve it if (initialization_data != null) { is_playing_desired = initialization_data.getBoolean("playing"); Log.i ("GStreamer", "Restoring state, playing:" + is_playing_desired); } - /* Restore previous playing state */ + // Restore previous playing state if (is_playing_desired) { nativePlay(); } else { nativePause(); } - /* Re-enable buttons, now that GStreamer is initialized */ + // Re-enable buttons, now that GStreamer is initialized this.findViewById(R.id.button_play).setEnabled(true); this.findViewById(R.id.button_stop).setEnabled(true); }