00001 # % macro, P, Device Prefix
00002 # % macro, R, Device Suffix
00003 # % macro, PORT, Asyn Port name
00004 # % gui, $(PORT), edmtab, ffmpegFile.edl, P=$(P),R=$(R)
00005
00006 # # \file
00007 # # ffmpegFile wraps the ffmpeg compression libraries in an areaDetector plugin.
00008 # # It works in much the same way as the other NDFile plugins. By default, it
00009 # # will try to guess the file format from the file extension, but you can force
00010 # # it to a particular file format with the FileFormat record.
00011 # # \section ffmpegStream_setup Setup
00012 # # - In the database, an instance of NDPluginBase is required, followed by an
00013 # # instance of NDFile, then an instance of this template.
00014 # # - In the startup scripts, call ffmpegFileConfigure() once per ffmpegStream
00015 # # instance to setup the areadetector plugin
00016 # # - see \ref build_instructions
00017 # # \section ffmpegStream_screenshots Screenshots
00018 # # \htmlinclude flashvideo.html
00019 # # \image html ffmpegFileEdm.png "Edm screen for ffmpegFile"
00020
00021 # All tags starting with gdatag are DLS specific for GDA
00022 # % gdatag, template, ffmpegFile, $(PORT)_ffmpegFile, $(PORT) ffmpegFile class instance
00023
00024 # # File data format
00025 # % gdatag, mbbinary, rw, $(PORT)_ffmpegFile, FileFormat, Set FileFormat
00026 record(mbbo, "$(P)$(R)FileFormat")
00027 {
00028 field(ZRST, "Auto")
00029 field(ZRVL, "0")
00030 }
00031
00032 # # File data format from driver
00033 # % gdatag, mbbinary, ro, $(PORT)_ffmpegFile, FileFormat_RBV, Readback for FileFormat
00034 record(mbbi, "$(P)$(R)FileFormat_RBV")
00035 {
00036 field(ZRST, "Auto")
00037 field(ZRVL, "0")
00038 }
00039
00040 record(bo, "$(P)$(R)AutoSave")
00041 {
00042 field(VAL, "0")
00043 }
00044
00045 record(mbbo, "$(P)$(R)FileWriteMode")
00046 {
00047 field(VAL, "2")
00048 }
00049
00050 record(longout, "$(P)$(R)NumCapture")
00051 {
00052 field(VAL, "-1")
00053 }
00054
00055 # # FFMPEG Bitrate
00056 # % gdatag, pv, rw, $(PORT)_ffmpegFile, BITRATE, Set BITRATE
00057 record(ao, "$(P)$(R)BITRATE") {
00058 field(DTYP, "asynInt32")
00059 field(OUT, "@asyn($(PORT) 0)FFMPEG_BITRATE")
00060 field(VAL, "10000000")
00061 field(PINI, "YES")
00062 }
00063
00064 # # FFMPEG Bitrate from driver
00065 # % gdatag, pv, ro, $(PORT)_ffmpegFile, BITRATE_RBV, Readback for BITRATE
00066 record(ai, "$(P)$(R)BITRATE_RBV") {
00067 field(SCAN, "I/O Intr")
00068 field(DTYP, "asynInt32")
00069 field(INP, "@asyn($(PORT) 0)FFMPEG_BITRATE")
00070 }
00071
00072 # # FFMPEG Frames Per Second
00073 # % gdatag, pv, rw, $(PORT)_ffmpegFile, FPS, Set FPS
00074 record(ao, "$(P)$(R)FPS") {
00075 field(DTYP, "asynInt32")
00076 field(OUT, "@asyn($(PORT) 0)FFMPEG_FPS")
00077 field(VAL, "25")
00078 field(PINI, "YES")
00079 }
00080
00081 # # FFMPEG Frames Per Second from driver
00082 # % gdatag, pv, ro, $(PORT)_ffmpegFile, FPS_RBV, Readback for FPS
00083 record(ai, "$(P)$(R)FPS_RBV") {
00084 field(SCAN, "I/O Intr")
00085 field(DTYP, "asynInt32")
00086 field(INP, "@asyn($(PORT) 0)FFMPEG_FPS")
00087 }
00088
00089 # # FFMPEG Width
00090 # % gdatag, pv, rw, $(PORT)_ffmpegFile, WIDTH, Set WIDTH
00091 record(ao, "$(P)$(R)WIDTH") {
00092 field(DTYP, "asynInt32")
00093 field(OUT, "@asyn($(PORT) 0)FFMPEG_WIDTH")
00094 field(VAL, "640")
00095 field(PINI, "YES")
00096 }
00097
00098 # # FFMPEG Width from driver
00099 # % gdatag, pv, ro, $(PORT)_ffmpegFile, WIDTH_RBV, Readback for WIDTH
00100 record(ai, "$(P)$(R)WIDTH_RBV") {
00101 field(SCAN, "I/O Intr")
00102 field(DTYP, "asynInt32")
00103 field(INP, "@asyn($(PORT) 0)FFMPEG_WIDTH")
00104 }
00105
00106 # # FFMPEG Height
00107 # % gdatag, pv, rw, $(PORT)_ffmpegFile, HEIGHT, Set HEIGHT
00108 record(ao, "$(P)$(R)HEIGHT") {
00109 field(DTYP, "asynInt32")
00110 field(OUT, "@asyn($(PORT) 0)FFMPEG_HEIGHT")
00111 field(VAL, "480")
00112 field(PINI, "YES")
00113 }
00114
00115 # # FFMPEG Height from driver
00116 # % gdatag, pv, ro, $(PORT)_ffmpegFile, HEIGHT_RBV, Readback for HEIGHT
00117 record(ai, "$(P)$(R)HEIGHT_RBV") {
00118 field(SCAN, "I/O Intr")
00119 field(DTYP, "asynInt32")
00120 field(INP, "@asyn($(PORT) 0)FFMPEG_HEIGHT")
00121 }