Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meta-elphel393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
meta-elphel393
Commits
3034b25b
Commit
3034b25b
authored
May 06, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add libogg with patches and camogm
parent
38917b39
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1659 additions
and
0 deletions
+1659
-0
apps-camogm_1.0.bb
recipes-core/apps-camogm/apps-camogm_1.0.bb
+33
-0
LICENSE
recipes-core/apps-camogm/files/LICENSE
+1499
-0
core-image-elphel393.bb
recipes-core/images/core-image-elphel393.bb
+1
-0
framing.c.patch
recipes-multimedia/libogg/files/framing.c.patch
+70
-0
ogg.h.patch
recipes-multimedia/libogg/files/ogg.h.patch
+52
-0
libogg_1.3.2.bbappend
recipes-multimedia/libogg/libogg_1.3.2.bbappend
+4
-0
No files found.
recipes-core/apps-camogm/apps-camogm_1.0.bb
0 → 100644
View file @
3034b25b
SUMMARY = "Userspace application for the Elphel NC393 camera"
DESCRIPTION = "Simple and fast HTTP server to send camera still images"
AUTHOR = "Elphel Inc."
HOMEPAGE = "http://www3.elphel.com/"
PRIORITY = "optional"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=21;endline=699;md5=ccd2fef7dee090f3b211c6677c3e34cc"
SRCDATE = "20160503"
PV = "${SRCDATE}"
PR = "r0"
DEV_DIR ?= "${TOPDIR}/../../linux-elphel/linux/source"
EXTRA_OEMAKE = "ELPHEL_KERNEL_DIR=${DEV_DIR}"
APPS_DIR = "${TOPDIR}/../../rootfs-elphel"
FILESEXTRAPATHS_append := "${APPS_DIR}/elphel-apps-camogm:"
S = "${WORKDIR}"
SRC_URI = "file://.* \
file://LICENSE \
"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/camogm ${D}${bindir}
}
PACKAGES = " camogm"
recipes-core/apps-camogm/files/LICENSE
0 → 100644
View file @
3034b25b
This diff is collapsed.
Click to expand it.
recipes-core/images/core-image-elphel393.bb
View file @
3034b25b
...
...
@@ -30,6 +30,7 @@ IMAGE_INSTALL_append += " python-core \
php-cli \
libsjs \
smartmontools \
libogg \
init-elphel393"
#kernel-modules
...
...
recipes-multimedia/libogg/files/framing.c.patch
0 → 100644
View file @
3034b25b
--- ./src/framing.c 2005-11-27 21:26:05.000000000 -0700
+++ ./src/framing.c 2007-11-11 13:36:15.000000000 -0700
@@ -315,6 +315,67 @@
return(0);
}
+#ifdef ELPHEL_OGG
+//! Support for a packet structure to use packets consisting of several memory chunks each (like MJPEG header
+//! and data in circular buffer of Elphel cameras (for now counting on copying packets in libogg)
+//int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op){
+ int ogg_stream_packetin_elph(ogg_stream_state *os, elph_ogg_packet *op) {
+
+ int lacing_vals=op->bytes/255+1,i;
+
+ if(os->body_returned){
+ /* advance packet data according to the body_returned pointer. We
+ had to keep it around to return a pointer into the buffer last
+ call */
+
+ os->body_fill-=os->body_returned;
+ if(os->body_fill)
+ memmove(os->body_data,os->body_data+os->body_returned,
+ os->body_fill);
+ os->body_returned=0;
+ }
+
+ /* make sure we have the buffer storage */
+ _os_body_expand(os,op->bytes);
+ _os_lacing_expand(os,lacing_vals);
+
+ /*! Copy in the submitted packet. Yes, the copy is a waste; this is
+ the liability of overly clean abstraction for the time being. It
+ will actually be fairly easy to eliminate the extra copy in the
+ future */
+// memcpy(os->body_data+os->body_fill,op->packet,op->bytes);
+// os->body_fill+=op->bytes;
+ long bytes_left=op->bytes;
+ int chunk_index=0;
+ while (bytes_left>0) {
+ memcpy(os->body_data+os->body_fill,op->packet[chunk_index].chunk,op->packet[chunk_index].bytes);
+ os->body_fill+=op->packet[chunk_index].bytes;
+ bytes_left-=op->packet[chunk_index].bytes;
+ chunk_index++;
+ }
+
+ /* Store lacing vals for this packet */
+ for(i=0;i<lacing_vals-1;i++){
+ os->lacing_vals[os->lacing_fill+i]=255;
+ os->granule_vals[os->lacing_fill+i]=os->granulepos;
+ }
+ os->lacing_vals[os->lacing_fill+i]=(op->bytes)%255;
+ os->granulepos=os->granule_vals[os->lacing_fill+i]=op->granulepos;
+
+ /* flag the first segment as the beginning of the packet */
+ os->lacing_vals[os->lacing_fill]|= 0x100;
+
+ os->lacing_fill+=lacing_vals;
+
+ /* for the sake of completeness */
+ os->packetno++;
+
+ if(op->e_o_s)os->e_o_s=1;
+
+ return(0);
+}
+#endif
+
/* This will flush remaining packets into a page (returning nonzero),
even if there is not enough data to trigger a flush normally
recipes-multimedia/libogg/files/ogg.h.patch
0 → 100644
View file @
3034b25b
--- ./include/ogg/ogg.h 2005-11-27 21:26:05.000000000 -0700
+++ ./include/ogg/ogg.h 2007-11-11 13:33:16.000000000 -0700
@@ -16,7 +16,7 @@
********************************************************************/
#ifndef _OGG_H
#define _OGG_H
-
+#define ELPHEL_OGG y
#ifdef __cplusplus
extern "C" {
#endif
@@ -95,6 +95,29 @@
(which is in a seperate abstraction
layer) also knows about the gap */
} ogg_packet;
+#ifdef ELPHEL_OGG
+//! New packet structure that supports packets consisting of several memory chunks each (like MJPEG header
+//! and data in circular buffer of Elphel cameras
+typedef struct {
+ unsigned char *chunk;
+ long bytes;
+} elph_packet_chunk;
+
+typedef struct {
+ elph_packet_chunk *packet;
+ long bytes;
+ long b_o_s;
+ long e_o_s;
+
+ ogg_int64_t granulepos;
+
+ ogg_int64_t packetno; /* sequence number for decode; the framing
+ knows where there's a hole in the data,
+ but we need coupling so that the codec
+ (which is in a seperate abstraction
+ layer) also knows about the gap */
+} elph_ogg_packet;
+#endif
typedef struct {
unsigned char *data;
@@ -148,6 +171,12 @@
/* Ogg BITSTREAM PRIMITIVES: encoding **************************/
+#ifdef ELPHEL_OGG
+//! Support for a packet structure to use packets consisting of several memory chunks each (like MJPEG header
+//! and data in circular buffer of Elphel cameras (for now counting on copying packets in libogg)
+extern int ogg_stream_packetin_elph(ogg_stream_state *os, elph_ogg_packet *op);
+#endif
+
extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
extern int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov,
recipes-multimedia/libogg/libogg_1.3.2.bbappend
0 → 100644
View file @
3034b25b
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append += "file://framing.c.patch \
file://ogg.h.patch"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment