Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[rbp/linux] changed move BitstreamConverter to a common location #1473

Merged
merged 3 commits into from

2 participants

@huceke
Collaborator

This moves BitstreamConverter to a common location. BitstreamConverter does not belong to omxplayer alone.

@huceke huceke was assigned
@davilla

could also do a git mv :)

@huceke
Collaborator

@jmarshallnz, @cptspiff : Ok to merge before the merge window ? I would need it for another change. Move OMXImage -> guilib where it belongs to.

@ghost

afaict this is just a refactor. okay by me.

@huceke huceke merged commit 318230c into xbmc:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
1  xbmc/cores/omxplayer/Makefile.in
@@ -7,7 +7,6 @@ SRCS += OMXAudioCodecOMX.cpp
SRCS += OMXPlayerAudio.cpp
SRCS += OMXPlayerVideo.cpp
SRCS += OMXImage.cpp
-SRCS += BitstreamConverter.cpp
LIB = omxplayer.a
View
2  xbmc/cores/omxplayer/OMXImage.cpp
@@ -29,7 +29,7 @@
#include "utils/log.h"
#include "linux/XMemUtils.h"
-#include "BitstreamConverter.h"
+#include "utils/BitstreamConverter.h"
#include <sys/time.h>
#include <inttypes.h>
View
1  xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -53,7 +53,6 @@
#include "utils/LangCodeExpander.h"
#include "guilib/LocalizeStrings.h"
-#include "BitstreamConverter.h"
#include "storage/MediaManager.h"
#include "GUIUserMessages.h"
#include "utils/StreamUtils.h"
View
2  xbmc/cores/omxplayer/OMXVideo.h
@@ -26,7 +26,7 @@
#include <IL/OMX_Video.h>
-#include "BitstreamConverter.h"
+#include "utils/BitstreamConverter.h"
#include "OMXClock.h"
View
6 xbmc/cores/omxplayer/BitstreamConverter.cpp → xbmc/utils/BitstreamConverter.cpp
@@ -350,7 +350,7 @@ const int CBitstreamConverter::isom_write_avcc(AVIOContext *pb, const uint8_t *d
if (len > 6)
{
/* check for h264 start code */
- if (OMX_RB32(data) == 0x00000001 || OMX_RB24(data) == 0x000001)
+ if (BS_RB32(data) == 0x00000001 || BS_RB24(data) == 0x000001)
{
uint8_t *buf=NULL, *end, *start;
uint32_t sps_size=0, pps_size=0;
@@ -367,7 +367,7 @@ const int CBitstreamConverter::isom_write_avcc(AVIOContext *pb, const uint8_t *d
{
uint32_t size;
uint8_t nal_type;
- size = FFMIN(OMX_RB32(buf), end - buf - 4);
+ size = FFMIN(BS_RB32(buf), end - buf - 4);
buf += 4;
nal_type = buf[0] & 0x1f;
if (nal_type == 7) /* SPS */
@@ -662,7 +662,7 @@ bool CBitstreamConverter::Convert(uint8_t *pData, int iSize)
uint8_t *nal_start = pData;
while (nal_start < end)
{
- nal_size = OMX_RB24(nal_start);
+ nal_size = BS_RB24(nal_start);
m_dllAvFormat->avio_wb16(pb, nal_size);
nal_start += 3;
m_dllAvFormat->avio_write(pb, nal_start, nal_size);
View
8 xbmc/cores/omxplayer/BitstreamConverter.h → xbmc/utils/BitstreamConverter.h
@@ -40,22 +40,22 @@ typedef struct {
// This is part of FFmpeg
// * License as published by the Free Software Foundation; either
// * version 2.1 of the License, or (at your option) any later version.
-#define OMX_RB16(x) \
+#define BS_RB16(x) \
((((const uint8_t*)(x))[0] << 8) | \
((const uint8_t*)(x)) [1])
-#define OMX_RB24(x) \
+#define BS_RB24(x) \
((((const uint8_t*)(x))[0] << 16) | \
(((const uint8_t*)(x))[1] << 8) | \
((const uint8_t*)(x))[2])
-#define OMX_RB32(x) \
+#define BS_RB32(x) \
((((const uint8_t*)(x))[0] << 24) | \
(((const uint8_t*)(x))[1] << 16) | \
(((const uint8_t*)(x))[2] << 8) | \
((const uint8_t*)(x))[3])
-#define OMX_WB32(p, d) { \
+#define BS_WB32(p, d) { \
((uint8_t*)(p))[3] = (d); \
((uint8_t*)(p))[2] = (d) >> 8; \
((uint8_t*)(p))[1] = (d) >> 16; \
View
1  xbmc/utils/Makefile
@@ -66,6 +66,7 @@ SRCS=AlarmClock.cpp \
Weather.cpp \
XBMCTinyXML.cpp \
XMLUtils.cpp \
+ BitstreamConverter.cpp \
LIB=utils.a
Something went wrong with that request. Please try again.