* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "avformat.h"
#include "config.h"
+#include "libavformat/avformat.h"
-#if ENABLE_LIBDC1394_2
+#if HAVE_LIBDC1394_2
#include <dc1394/dc1394.h>
-#elif ENABLE_LIBDC1394_1
+#elif HAVE_LIBDC1394_1
#include <libraw1394/raw1394.h>
#include <libdc1394/dc1394_control.h>
#define DC1394_FRAMERATE_15 FRAMERATE_15
#define DC1394_FRAMERATE_30 FRAMERATE_30
#define DC1394_FRAMERATE_60 FRAMERATE_60
+#define DC1394_FRAMERATE_120 FRAMERATE_120
+#define DC1394_FRAMERATE_240 FRAMERATE_240
#endif
#undef free
typedef struct dc1394_data {
-#if ENABLE_LIBDC1394_1
+#if HAVE_LIBDC1394_1
raw1394handle_t handle;
dc1394_cameracapture camera;
-#elif ENABLE_LIBDC1394_2
+#elif HAVE_LIBDC1394_2
dc1394_t *d;
dc1394camera_t *camera;
dc1394video_frame_t *frame;
{ 15000, DC1394_FRAMERATE_15 },
{ 30000, DC1394_FRAMERATE_30 },
{ 60000, DC1394_FRAMERATE_60 },
+ {120000, DC1394_FRAMERATE_120 },
+ {240000, DC1394_FRAMERATE_240 },
{ 0, 0 } /* gotta be the last one */
};
return -1;
}
-#if ENABLE_LIBDC1394_1
+#if HAVE_LIBDC1394_1
static int dc1394_v1_read_header(AVFormatContext *c, AVFormatParameters * ap)
{
dc1394_data* dc1394 = c->priv_data;
if (dc1394_read_common(c,ap,&fmt,&fps) != 0)
return -1;
- /* Now lets prep the hardware */
+ /* Now let us prep the hardware. */
dc1394->handle = dc1394_create_handle(0); /* FIXME: gotta have ap->port */
if (!dc1394->handle) {
av_log(c, AV_LOG_ERROR, "Can't acquire dc1394 handle on port %d\n", 0 /* ap->port */);
return 0;
}
-#elif ENABLE_LIBDC1394_2
+#elif HAVE_LIBDC1394_2
static int dc1394_v2_read_header(AVFormatContext *c, AVFormatParameters * ap)
{
dc1394_data* dc1394 = c->priv_data;
if (dc1394_read_common(c,ap,&fmt,&fps) != 0)
return -1;
- /* Now lets prep the hardware */
+ /* Now let us prep the hardware. */
dc1394->d = dc1394_new();
dc1394_camera_enumerate (dc1394->d, &list);
if ( !list || list->num == 0) {
AVInputFormat libdc1394_demuxer = {
.name = "libdc1394",
- .long_name = "dc1394 v.2 A/V grab",
+ .long_name = NULL_IF_CONFIG_SMALL("dc1394 v.2 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),
.read_header = dc1394_v2_read_header,
.read_packet = dc1394_v2_read_packet,
};
#endif
-#if ENABLE_LIBDC1394_1
+#if HAVE_LIBDC1394_1
AVInputFormat libdc1394_demuxer = {
.name = "libdc1394",
- .long_name = "dc1394 v.1 A/V grab",
+ .long_name = NULL_IF_CONFIG_SMALL("dc1394 v.1 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),
.read_header = dc1394_v1_read_header,
.read_packet = dc1394_v1_read_packet,