From 554ec0576432194f050191bdf248a1462d542a6d Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Tue, 27 Aug 2013 19:21:17 +0200
Subject: GLMediaPlayer: Add camera input / FFMPEG: Fix 'av_packet' leak and
add missing symbol 'av_realloc'.
- Add camera input
- Use URI w/ scheme 'camera' to determine camera input is desired,
use URI host as camera id.
E.g. 'camera://0' for 1st camera.
- AndroidGLMediaPlayerAPI14: Via 'Camera'
- FFMPEG*: Via libavdevice, device name and input format
- TODO: Add controls to manipulate camera if available
- FFMPEG*
- Add symbols
- avcodec_register_all
- av_realloc (was missing)
- avdevice_register_all
- Load libavdevice (opt)
- Camera:
- Use (windows) and /dev/video other OS
- simply find the input format in native code
- Support YUYV422 (used in video4linux2, etc.)
- Stuff 2x 16bpp (YUYV) into one RGBA pixel!
- Add texture format for 16bpp
- Add texture lookup shader
- Fix av_packet leak in readNextImpl(..)
- Restore orig pointer and size values,
we may have moved along within packet.
Then call av_free_packet().
- Use null AudioSink if audio-id is NONE
---
.../classes/com/jogamp/opengl/util/av/GLMediaPlayer.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'src/jogl/classes/com')
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
index 6235bdeb0..0feca9f45 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
@@ -47,6 +47,9 @@ import com.jogamp.opengl.util.TimeFrameI;
* Audio and video streams can be selected or muted via {@link #initStream(URI, int, int, int)}
* using the appropriate stream id's.
*
+ *
+ * Camera input can be selected using the {@link #CameraInputScheme} URI.
+ *
*
* StreamWorker Decoding Thread
*
@@ -190,6 +193,18 @@ public interface GLMediaPlayer extends TextureSequence {
/** Constant {@value} for auto or unspecified. See Audio and video Stream IDs. */
public static final int STREAM_ID_AUTO = -1;
+ /**
+ * {@link URI#getScheme() URI scheme} name {@value} for camera input. E.g. camera://0
+ * for the 1st camera device.
+ *
+ * Note: the {@link URI#getHost() URI host} is being used to identify the camera:
+ *
+ * camera://
+ *
+ *
+ */
+ public static final String CameraInputScheme = "camera";
+
/** Maximum video frame async of {@value} milliseconds. */
public static final int MAXIMUM_VIDEO_ASYNC = 22;
--
cgit v1.2.3