Pass dng/grw mode down to mpegize.
This commit is contained in:
@@ -13,6 +13,7 @@ SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
|
|||||||
GIGA_DIR="$2"
|
GIGA_DIR="$2"
|
||||||
DEST_NAME="$3"
|
DEST_NAME="$3"
|
||||||
FPS="$4"
|
FPS="$4"
|
||||||
|
MODE="$5"
|
||||||
|
|
||||||
echo script_dir $SCRIPT_DIR 1>&2
|
echo script_dir $SCRIPT_DIR 1>&2
|
||||||
echo GIGA_DIR $GIGA_DIR 1>&2
|
echo GIGA_DIR $GIGA_DIR 1>&2
|
||||||
@@ -28,7 +29,7 @@ elif [ "-$1" == "-stop" ]; then
|
|||||||
mkdir $GIGA_DIR/sm
|
mkdir $GIGA_DIR/sm
|
||||||
kill `cat $2/audio.pid`
|
kill `cat $2/audio.pid`
|
||||||
cd $GIGA_DIR
|
cd $GIGA_DIR
|
||||||
@LIBEXECDIR@/mpegize.py convert $GIGA_DIR/ $DEST_NAME $FPS
|
@LIBEXECDIR@/mpegize.py convert $GIGA_DIR/ $DEST_NAME $FPS $MODE
|
||||||
rm -r $GIGA_DIR
|
rm -r $GIGA_DIR
|
||||||
echo Message: Rec
|
echo Message: Rec
|
||||||
else
|
else
|
||||||
|
@@ -396,7 +396,7 @@ class Mpegize:
|
|||||||
return s[2], s[1], i
|
return s[2], s[1], i
|
||||||
|
|
||||||
def help(m):
|
def help(m):
|
||||||
print("mpegize command base-dir destination-movie fps")
|
print("mpegize command base-dir destination-movie fps dng|grw")
|
||||||
|
|
||||||
def run(m, argv):
|
def run(m, argv):
|
||||||
if len(argv) > 2:
|
if len(argv) > 2:
|
||||||
@@ -411,7 +411,7 @@ class Mpegize:
|
|||||||
print("Phase 2: mpegize -- ", argv[3])
|
print("Phase 2: mpegize -- ", argv[3])
|
||||||
print("Message: enc")
|
print("Message: enc")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
gst_convert(m.base, argv[3], True)
|
gst_convert(m.base, argv[3], argv[4]=="dng")
|
||||||
return
|
return
|
||||||
if mode == "gaps":
|
if mode == "gaps":
|
||||||
print("Video gaps")
|
print("Video gaps")
|
||||||
|
@@ -687,6 +687,20 @@ static void
|
|||||||
spawn_movie(char *cmd)
|
spawn_movie(char *cmd)
|
||||||
{
|
{
|
||||||
g_autoptr(GError) error = NULL;
|
g_autoptr(GError) error = NULL;
|
||||||
|
char *mode;
|
||||||
|
|
||||||
|
switch (state_proc.mode->v4l_pixfmt) {
|
||||||
|
case V4L2_PIX_FMT_UYVY:
|
||||||
|
case V4L2_PIX_FMT_YUYV:
|
||||||
|
case V4L2_PIX_FMT_YVYU:
|
||||||
|
case V4L2_PIX_FMT_VYUY:
|
||||||
|
mode = "grw";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mode = "dng";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
GSubprocess *proc = g_subprocess_new(G_SUBPROCESS_FLAGS_STDOUT_PIPE,
|
GSubprocess *proc = g_subprocess_new(G_SUBPROCESS_FLAGS_STDOUT_PIPE,
|
||||||
&error,
|
&error,
|
||||||
movie_script,
|
movie_script,
|
||||||
@@ -694,6 +708,7 @@ spawn_movie(char *cmd)
|
|||||||
burst_dir,
|
burst_dir,
|
||||||
movie_fname,
|
movie_fname,
|
||||||
"305",
|
"305",
|
||||||
|
mode,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!proc) {
|
if (!proc) {
|
||||||
|
Reference in New Issue
Block a user