Re: [media-ctl PATCH 1/7] Rename files to match the names of the libraries

2011-10-08 Thread Laurent Pinchart
Applied :-)

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [media-ctl PATCH 1/7] Rename files to match the names of the libraries

2011-10-08 Thread Sakari Ailus
On Sat, Oct 08, 2011 at 01:53:07PM +0200, Laurent Pinchart wrote:
 Applied :-)

Thanks!

-- 
Sakari Ailus
e-mail: sakari.ai...@iki.fi jabber/XMPP/Gmail: sai...@retiisi.org.uk
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[media-ctl PATCH 1/7] Rename files to match the names of the libraries

2011-10-07 Thread Sakari Ailus
Rename media.* to mediactl.* and subdev.* v4l2subdev.*.

Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
---
 src/Makefile.am  |6 +-
 src/main.c   |4 +-
 src/media.c  |  475 --
 src/media.h  |  161 --
 src/mediactl.c   |  475 ++
 src/mediactl.h   |  161 ++
 src/subdev.c |  188 -
 src/subdev.h |  162 ---
 src/v4l2subdev.c |  188 +
 src/v4l2subdev.h |  162 +++
 10 files changed, 991 insertions(+), 991 deletions(-)
 delete mode 100644 src/media.c
 delete mode 100644 src/media.h
 create mode 100644 src/mediactl.c
 create mode 100644 src/mediactl.h
 delete mode 100644 src/subdev.c
 delete mode 100644 src/subdev.h
 create mode 100644 src/v4l2subdev.c
 create mode 100644 src/v4l2subdev.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 52628d2..2583464 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,8 @@
 lib_LTLIBRARIES = libmediactl.la libv4l2subdev.la
-libmediactl_la_SOURCES = media.c
-libv4l2subdev_la_SOURCES = subdev.c
+libmediactl_la_SOURCES = mediactl.c
+libv4l2subdev_la_SOURCES = v4l2subdev.c
 mediactl_includedir=$(includedir)/mediactl
-mediactl_include_HEADERS = media.h subdev.h
+mediactl_include_HEADERS = mediactl.h v4l2subdev.h
 
 bin_PROGRAMS = media-ctl
 media_ctl_CFLAGS = $(LIBUDEV_CFLAGS)
diff --git a/src/main.c b/src/main.c
index b9b9150..55a6e2d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,9 +36,9 @@
 #include linux/v4l2-subdev.h
 #include linux/videodev2.h
 
-#include media.h
+#include mediactl.h
 #include options.h
-#include subdev.h
+#include v4l2subdev.h
 #include tools.h
 
 /* 
-
diff --git a/src/media.c b/src/media.c
deleted file mode 100644
index f443d0c..000
--- a/src/media.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/*
- * Media controller test application
- *
- * Copyright (C) 2010 Ideas on board SPRL laurent.pinch...@ideasonboard.com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- */
-
-#include config.h
-
-#include sys/ioctl.h
-#include sys/stat.h
-#include sys/types.h
-
-#include unistd.h
-#include stdio.h
-#include stdlib.h
-#include string.h
-#include fcntl.h
-#include errno.h
-
-#include linux/videodev2.h
-#include linux/media.h
-
-#include media.h
-#include tools.h
-
-struct media_pad *media_entity_remote_source(struct media_pad *pad)
-{
-   unsigned int i;
-
-   if (!(pad-flags  MEDIA_PAD_FL_SINK))
-   return NULL;
-
-   for (i = 0; i  pad-entity-num_links; ++i) {
-   struct media_link *link = pad-entity-links[i];
-
-   if (!(link-flags  MEDIA_LNK_FL_ENABLED))
-   continue;
-
-   if (link-sink == pad)
-   return link-source;
-   }
-
-   return NULL;
-}
-
-struct media_entity *media_get_entity_by_name(struct media_device *media,
- const char *name, size_t length)
-{
-   unsigned int i;
-
-   for (i = 0; i  media-entities_count; ++i) {
-   struct media_entity *entity = media-entities[i];
-
-   if (strncmp(entity-info.name, name, length) == 0)
-   return entity;
-   }
-
-   return NULL;
-}
-
-struct media_entity *media_get_entity_by_id(struct media_device *media,
-   __u32 id)
-{
-   unsigned int i;
-
-   for (i = 0; i  media-entities_count; ++i) {
-   struct media_entity *entity = media-entities[i];
-
-   if (entity-info.id == id)
-   return entity;
-   }
-
-   return NULL;
-}
-
-int media_setup_link(struct media_device *media,
-struct media_pad *source,
-struct media_pad *sink,
-__u32 flags)
-{
-   struct media_link *link;
-   struct media_link_desc ulink;
-   unsigned int i;
-   int ret;
-
-   for (i = 0; i  source-entity-num_links; i++) {
-   link = source-entity-links[i];
-
-   if (link-source-entity == source-entity 
-   link-source-index == source-index 
-   link-sink-entity == sink-entity 
-