Pattern brushes were a wee bit tricky in previous versions of Illustrator. While it was certainly possible to build a picture frame with crazy corners, you'd have to build all those corners by hand. Now, you can get Illustrator CC to do the hard work for you. Let's find out how.
You can start out with any kind of artwork you like: vector, raster, but make sure that raster images have been embedded. (Also note that vector art will be expanded when it becomes part of a pattern.) Generally, it's easiest to create part of the edge of a patterned line. Here, I'll open with a random left-to-right line with a rough texture and a few effects applied to make it spiky.
A squiggle, a roughen, a bloat.
While the Pattern Maker is excellent at previewing a pattern, it's also quite good at previewing how a Pattern Brush will look. With your art selected, choose Edit > Pattern > Make, then choose 1x3 from the Copies drop-down in the Pattern Maker panel that appears. Now that you can see the line that you'll get, move the edges of the line to create a continuous path with the greyed-out copies on the left and right of your line. Select All, then press Copy, and finally, press Done at the top of the window.
Now that the line is visible, extend the black copy in the middle to meet the grey ones at the edges.
Back in your document, Paste the line that you copied from the Pattern Maker. In the Brushes panel, press the New button to create a new brush, and choose Pattern Brush. Your artwork becomes the Side Tile in the new brush, and you just need to finesse the corners to make them look their best.
Four different spiky corner options in the new pattern brush.
In the dialog, you'll see a preview of what Illustrator's chosen to insert on the corners. However, you can choose whatever you want for the outer corners and the inner corners, either a pre-defined pattern, or from the new auto options:
Depending on your line, some or none of these could look good, but they're a whole lot better than the non-existent options we had before.
Draw a rectangle and apply your new pattern brush to it. If the original shape is quite large, you'll have to make the stroke width quite small '" perhaps even 0.1 or 0.2 pt '" to keep it manageable.
Here's my path at 0.2 pt.
Double-clicking the brush in the Brushes panel allows you to change the original pattern brush's settings, so you can experiment with scaling (avoiding those 0.2 pt lines), flipping, spacing, colorization and the like. Should something still not be quite right, you might need to revise the original shape you started with, and create a new brush from scratch.
Pattern brushes are now easier to make than they've been, allowing some quite ornate frames to be magicked up with a minimum of effort. If you've got a slow day, why not experiment with your favorite dingbat or ornaments font? You never know what you might just come up with. Good luck!
Yes, this is one of the glyphs from Adobe Wood Type Ornaments.