mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
docs/random/ds/0.9-suggested-changes: Random ramblings
Original commit message from CVS: * docs/random/ds/0.9-suggested-changes: Random ramblings * gst/elements/gstfilesrc.c: (gst_filesrc_get_mmap): Cast size_t to int before printing. * gst/parse/grammar.y: Fix gcc-2.95 style variadic macros. * gst/parse/parse.l: same. See bug #129600
This commit is contained in:
parent
168eaa4f68
commit
d19ae033fd
6 changed files with 41 additions and 15 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-02-06 David Schleef <ds@schleef.org>
|
||||
|
||||
* docs/random/ds/0.9-suggested-changes: Random ramblings
|
||||
* gst/elements/gstfilesrc.c: (gst_filesrc_get_mmap): Cast size_t
|
||||
to int before printing.
|
||||
* gst/parse/grammar.y: Fix gcc-2.95 style variadic macros.
|
||||
* gst/parse/parse.l: same. See bug #129600
|
||||
|
||||
2004-02-06 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/gstindex.c: (gst_index_add_format), (gst_index_add_id),
|
||||
|
|
|
@ -6,6 +6,15 @@ API:
|
|||
|
||||
- events should all use GstStructure
|
||||
|
||||
- reorganize headers (split app headers vs plugin headers maybe)
|
||||
|
||||
- make GstPadLinkReturn internal (to either plugins+core or just core)
|
||||
and return gboolean to apps.
|
||||
|
||||
- rewrite GstIndex
|
||||
|
||||
- gst_init() et al. need to work correctly when called multiple times
|
||||
and from libraries, etc.
|
||||
|
||||
caps:
|
||||
|
||||
|
@ -28,6 +37,11 @@ caps:
|
|||
|
||||
But that's 0.10 material."
|
||||
|
||||
negotiation:
|
||||
|
||||
autopluggers would be easier to write if there was a core method
|
||||
to do what plugidentities do.
|
||||
|
||||
bugs with interesting info:
|
||||
|
||||
XML descriptions of plugin information:
|
||||
|
|
|
@ -484,7 +484,7 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
|||
/* ('cause by definition if readend is in the buffer, so's readstart) */
|
||||
if (readend <= mapend) {
|
||||
GST_LOG_OBJECT (src, "read buf %llu+%d lives in current mapbuf %lld+%d, creating subbuffer of mapbuf",
|
||||
src->curoffset, readsize, mapstart, mapsize);
|
||||
src->curoffset, (int)readsize, mapstart, mapsize);
|
||||
buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - mapstart,
|
||||
readsize);
|
||||
GST_BUFFER_OFFSET (buf) = src->curoffset;
|
||||
|
@ -516,12 +516,13 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
|||
/* then deal with the case where the read buffer is totally outside */
|
||||
if (buf == NULL) {
|
||||
/* first check to see if there's a map that covers the right region already */
|
||||
GST_LOG_OBJECT (src, "searching for mapbuf to cover %llu+%d",src->curoffset,readsize);
|
||||
GST_LOG_OBJECT (src, "searching for mapbuf to cover %llu+%d",
|
||||
src->curoffset,(int)readsize);
|
||||
|
||||
/* if the read buffer crosses a mmap region boundary, create a one-off region */
|
||||
if ((src->curoffset / src->mapsize) != (readend / src->mapsize)) {
|
||||
GST_LOG_OBJECT (src, "read buf %llu+%d crosses a %d-byte boundary, creating a one-off",
|
||||
src->curoffset,readsize,src->mapsize);
|
||||
src->curoffset,(int)readsize,(int)src->mapsize);
|
||||
buf = gst_filesrc_map_small_region (src, src->curoffset, readsize);
|
||||
if (buf == NULL)
|
||||
return NULL;
|
||||
|
@ -539,7 +540,8 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
|||
|
||||
/* double the mapsize as long as the readsize is smaller */
|
||||
while (readsize - (src->curoffset - nextmap) > mapsize) {
|
||||
GST_LOG_OBJECT (src, "readsize smaller then mapsize %08x %d", readsize, mapsize);
|
||||
GST_LOG_OBJECT (src, "readsize smaller then mapsize %08x %d",
|
||||
readsize, (int)mapsize);
|
||||
mapsize <<=1;
|
||||
}
|
||||
/* create a new one */
|
||||
|
|
|
@ -123,21 +123,21 @@ typedef struct {
|
|||
#define SET_ERROR(error, type, args...) G_STMT_START{ \
|
||||
if (error) { \
|
||||
if (*(error)) { \
|
||||
g_warning ( ## args ); \
|
||||
g_warning ( args ); \
|
||||
} else { \
|
||||
g_set_error ((error), GST_PARSE_ERROR, (type), ## args ); \
|
||||
g_set_error ((error), GST_PARSE_ERROR, (type), args ); \
|
||||
}\
|
||||
} \
|
||||
}G_STMT_END
|
||||
#define ERROR(type, args...) SET_ERROR (((graph_t *) graph)->error, (type), ## args )
|
||||
#define ERROR(type, args...) SET_ERROR (((graph_t *) graph)->error, (type) , args )
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
# define YYDEBUG 1
|
||||
/* bison 1.35 calls this macro with side effects, we need to make sure the
|
||||
side effects work - crappy bison
|
||||
# define YYFPRINTF(a, args...) GST_CAT_DEBUG (GST_CAT_PIPELINE, ## args )
|
||||
# define YYFPRINTF(a, args...) GST_CAT_DEBUG (GST_CAT_PIPELINE, args )
|
||||
*/
|
||||
# define YYFPRINTF(a, args...) G_STMT_START{ \
|
||||
gchar *temp = g_strdup_printf ( ## args ); \
|
||||
gchar *temp = g_strdup_printf ( args ); \
|
||||
GST_CAT_DEBUG (GST_CAT_PIPELINE, temp); \
|
||||
g_free (temp); \
|
||||
}G_STMT_END
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include "grammar.tab.h"
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define PRINT(...) GST_CAT_DEBUG (GST_CAT_PIPELINE, "flex: "__VA_ARGS__)
|
||||
#define PRINT(...) GST_CAT_DEBUG (GST_CAT_PIPELINE, "flex: " __VA_ARGS__)
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
#define PRINT(args...) GST_CAT_DEBUG (GST_CAT_PIPELINE, "flex: "##args)
|
||||
#define PRINT(args...) GST_CAT_DEBUG (GST_CAT_PIPELINE, "flex: " args)
|
||||
#else
|
||||
#define PRINT(args...)
|
||||
#endif
|
||||
|
|
|
@ -484,7 +484,7 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
|||
/* ('cause by definition if readend is in the buffer, so's readstart) */
|
||||
if (readend <= mapend) {
|
||||
GST_LOG_OBJECT (src, "read buf %llu+%d lives in current mapbuf %lld+%d, creating subbuffer of mapbuf",
|
||||
src->curoffset, readsize, mapstart, mapsize);
|
||||
src->curoffset, (int)readsize, mapstart, mapsize);
|
||||
buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - mapstart,
|
||||
readsize);
|
||||
GST_BUFFER_OFFSET (buf) = src->curoffset;
|
||||
|
@ -516,12 +516,13 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
|||
/* then deal with the case where the read buffer is totally outside */
|
||||
if (buf == NULL) {
|
||||
/* first check to see if there's a map that covers the right region already */
|
||||
GST_LOG_OBJECT (src, "searching for mapbuf to cover %llu+%d",src->curoffset,readsize);
|
||||
GST_LOG_OBJECT (src, "searching for mapbuf to cover %llu+%d",
|
||||
src->curoffset,(int)readsize);
|
||||
|
||||
/* if the read buffer crosses a mmap region boundary, create a one-off region */
|
||||
if ((src->curoffset / src->mapsize) != (readend / src->mapsize)) {
|
||||
GST_LOG_OBJECT (src, "read buf %llu+%d crosses a %d-byte boundary, creating a one-off",
|
||||
src->curoffset,readsize,src->mapsize);
|
||||
src->curoffset,(int)readsize,(int)src->mapsize);
|
||||
buf = gst_filesrc_map_small_region (src, src->curoffset, readsize);
|
||||
if (buf == NULL)
|
||||
return NULL;
|
||||
|
@ -539,7 +540,8 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
|||
|
||||
/* double the mapsize as long as the readsize is smaller */
|
||||
while (readsize - (src->curoffset - nextmap) > mapsize) {
|
||||
GST_LOG_OBJECT (src, "readsize smaller then mapsize %08x %d", readsize, mapsize);
|
||||
GST_LOG_OBJECT (src, "readsize smaller then mapsize %08x %d",
|
||||
readsize, (int)mapsize);
|
||||
mapsize <<=1;
|
||||
}
|
||||
/* create a new one */
|
||||
|
|
Loading…
Reference in a new issue